If I already have the explode(“/”, $_SERVER[‘REQUEST_URI’]) in my routing system, why do I need the mod_rewrite and other apache url rewriting settings?
If I already have the explode(/, $_SERVER[‘REQUEST_URI’]) in my routing system, why do I
Share
When you do not have mod_rewrite and the .htaccess file to specify what to do with an url like
domain.com/foo/barthe server searches for the folderfooand then the folderbarto look for the index file to show the user.If you need it to be handled within your script, you need to first redirect the user to your base script then use explode on your query string and then proceed further. This is where mod_rewrite and .htaccess come into play.