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?
Asked
Active
Viewed 171 times
1 Answers
7
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.
![](../../users/profiles/1375.webp)
womble
- 95,029
- 29
- 173
- 228
-
How do I set it not to apply to subdirectories? – Robin Rodricks Jul 08 '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 09 '09 at 02:42