Say I already have a list of other files and folders in the root directory of my site:
And I now want to add a mod_rewrite rule that serves the content of requests likeCode:mysite/staticpage1.php mysite/staticpage2.php mysite/folder1 mysite/folder2 ... etc
and yet I do not want to interfere with the existing pages and folders, nor do I want to change file extensions.Code:/pages/index.php
Is there a way of using mod_rewrite, or similar so that it (pseudo)
if file is found, go there
if folder is found, go there
else get content of /pages/index.php?<URL>
I would normally just create a folder and send the links to, and serve the content, from that folder - so have not really come across this challenge before.
Is it possible to do this without invoking and handling a 404?