DirectoryIndex in .htaccess
This is an open discussion with 2 replies, filed under Installation.
Search
I think to modify the DirectoryIndex the syntax is:
DirectoryIndex +index.php
But don't hold me to that.
I believe ibolmo has it right. I've been doing the same thing. List the files, space delimited, according to the order in which you want these files to be evaluated. The first file will be used as the directory index. If index.html
should override index.php
, it should be listed first. For example, you could do something like this.
DirectoryIndex index.html index.htm home.html home.htm index.php
There are some discussions about this in the main forum that could be helpful, including the settings for compatibility with a subversion repository (TextDrive).
Create an account or sign in to comment.
Hey so it was bugging me for a while, but then I realized that the
DirectoryIndex
in.htaccess
Didn't include
index.html
. As a result, when ever I navigated to folders withindex.html
s I would just get:To fix just change Line 31 in
.htaccess
(root dir.) to:Figured I should point it out incase anyone else was wondering. ;)
Edit: I don't suppose it's possible to read the Apache settings and set the DirectoryIndex accordingly? Perhaps
apache_getenv
?