In my application, I have wikis blogs and other content where the author can assign a URL when creating them so that is is optimized for search engines.
So, I want to redirect the URLs to index.php where I check against the database and generate the output accordingly.
But, there are also requests for CSS, images and other files which I have to leave alone.
-
I can either exclude CSS, images etc in HTACCESS and redirect everything else to index.php.
-
Or I can redirect everything to index.php and then simply change back the location using header() for images css etc..
Which method should I go for?
What about only handing any resource file/directory request that doesn’t exist off to your
index.phpfile? I think that’s usually how these things work..htaccess –