Redirect everything to index.php

Posted by pixel on Stack Overflow See other posts from Stack Overflow or by pixel
Published on 2010-04-19T16:52:43Z Indexed on 2010/04/19 17:13 UTC
Read the original article Hit count: 244

Filed under:
|

I'm trying to do clean urls by exploding $_SERVER['REQUEST_URI'] and then switching between the results.

However, once a user goes outside index.php, I'm assuming I need to redirect them back to index.php in order to process the URL they want to reach. How can I accomplish this?

So for instance, user goes to www.domain.com/home/johndoe/... i'd like the index.php (domain.com/index.php) to be hit so that it can process the /home/johndoe/ via request_uri.

© Stack Overflow or respective owner

Related posts about php

Related posts about redirect