Apache Mod_Rewrite folder if index file does not exist
Posted on 2009-04-24
Is there a way to use Mod_Rewrite to redirect if the requested page is a folder and an index page does not exist in that folder?
Someone types "http://some.site.com/folder/"
If a file that is not considered an index is not located in this folder, then redirect to whatever page. It would likely need to check for any of the following: index.htm, index.html, index.asp, index.php, as well as maybe things like default.html or home.html.
Alternately, can Mod_Rewrite actually check to see that the default pages on the server are and then check for the existence of pages in that list?