Link to home
Start Free TrialLog in
Avatar of Hube02
Hube02Flag for United States of America

asked on

Apache Mod_Rewrite folder if index file does not exist

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?

For example:

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?
ASKER CERTIFIED SOLUTION
Avatar of caterham_www
caterham_www
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Hube02

ASKER

Sorry I didn't close this earlier, forgot it was here. Thanks for the help.