Can I configure one specific directory on my webserver to use an atypical default file such as "default.php" instead of "index.php"? Do I have to create a ".htaccess" file in that dir?

link|improve this question

71% accept rate
feedback

1 Answer

up vote 7 down vote accepted

Yep, put the following in a .htaccess file:

DirectoryIndex default.php

And that will apply to that directory, and I think all subdirectories.

This assumes you're using Apache; other webservers may have other conventions.

link|improve this answer
How do I set it not to apply to subdirectories? – Jenko Jul 8 '09 at 11:13
You don't, as far as I know. You need to put in separate .htaccess files for the subdirectories. – womble Jul 9 '09 at 2:42
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.