Forum Moderators: phranque
My httpd.conf file shows the DirectoryIndex like this:
DirectoryIndex index.shtml index.html index.php index.html.var index.HTM
It's my understanding that with the above order, index.shtml would take precedence over index.html, index.shtml would take precedence over index.php and so on.
What I'm wanting to do is to have index.shtml and index.php in the same directory, but when a user visits www.mysite.com, the index.shtml shows up by default and not the index.php. When I'm done with index.shtml, I'll delete it, which would cause index.php to bump to the top of the list.
However, index.php is overriding index.shtml. Any ideas on how I can get index.shtml to override index.php?
"The server will return the first one that it finds, but that does not necessarily mean it will look for them in the order specified in the DirectoryIndex directive. I couldn't find any definitive documentation stating how exactly this is accomplished/processed, so you may have to pull the source code to see. I'm guessing it looks in the current working directory first, likely in alphabetical order, then follow any other directory specific index options in order given. "
Use a complete list of options:DirectoryIndex index.cgi index.pl index.shtml index.htmlwhere you list the most common choice first.
Apache Performance Tuning [httpd.apache.org]
I don't think we would be told to list the most common choice first unless it had some significance. Check the MultiViews option as stated, I'll bet that is your issue.