• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Changing index file priority order?

N

NightMan

Guest
I have changed the file list in the httpd.conf as follows:

DirectoryIndex at_domains_index.html index.html index.htm index.php index.php3 index.html.var index.shtml index.cfm

But apache still load the index.php instead index.html after the restart.

Both files are existing in the httpfolders.

I am looking for a serverwide solution. not a .htaccess solution. (I know it can solve this)
 
Which httpd.conf?
If this is for a virtual domain, you should be using a vhost.conf.
If this is in the main httpd.conf, local values in the virtual domains httpd.conf files will override that one.
 
Was there ever a solution?

I'm having the same exact problem here. I noticed it some time ago but now I have a customer who wants a starting index.html file and from there it can go to an applications index.php file. Problem it since they are both in the root folder, it always loads the index.php file, even though index.html is the first listed in the DirectoryIndex directive in the main server apache conf file. Does anyone know why the server does this?

TIA,

Rob
LNHosting
 
As to 'a solution', the easiest would be to rename the .php to something like index2.php. I have not seen any other posts either here on the Plesk forums or other support forums which offer other alternatives.

All the posts I have seen are related to Apache 2.x

Testing has shown it is not related to order of the DirectoryIndex list items, nor related to Multiviews. Per the Apache 2.x docs it 'should' be based on the list order, but that has not worked for many of those who have tried...

Per Apache 2.x docs:
Use a complete list of options:

DirectoryIndex index.cgi index.pl index.shtml index.html

where you list the most common choice first.
This has made no difference to many people's servers.
 
I am not sure, the .htaccess solution will overrule the httpd.conf.

but worth to try!
 
glad to know I'm not crazy

i had read the same things about priority etc so I'm glad I'm not the only with the problem.

Can anyone offer a .htaccess solution for this? There is already a .htaccess in the root (for Mambo search engine friendly control). Any help is appreciated as .htaccess is not one of my strong points and I've done very little of it.

TIA,

Rob
LNHosting
 
Change Default Homepage
The DirectoryIndex directive allows you to specify which file is to be loaded as your default page whenever someone requests your Homepage. To change your default page, simply place the following in an htaccess file:

DirectoryIndex filename.html

The filename.html will now be loaded as your default page. You can specify DirectoryIndex pages for any directory in your site.
 
Hi Guys.

I have some entries in conf files and maybe help ..

for this example I will use my test platform (FreeBsd 4.9 + Plesk 7.5.4 + Sitebuilder)

in /usr/local/psa/apache/conf I have de default http.conf with:

<IfModule mod_dir.c>
DirectoryIndex at_domains_index.html index.html index.htm index.php index.ph
p4 index.php3 index.shtml index.cfm
</IfModule>

and the last statment is:

Include /usr/local/psa/apache/conf/sitebuilder.conf

to load the specific parameters to SiteBuilder..

Where I vave (and tested now this):

DirectoryIndex index.html index.php

If I move the index.html to index.htm the apache start do deliver the default index.php If I return the index.htm to index.html it delivery contents from this file..

the apache version in default install form plesk in FreeBSD is 1.3.33 and it works.

Tia.
 
thanks!

Just adding a .htaccess with the DirectoryIndex directive worked like a charm.

Thanks a bunch!

Rob
 
Originally posted by NightMan

I am looking for a serverwide solution. not a .htaccess solution. (I know it can solve this)

Probably the http.conf is the best in this case :)

.htacess is per directory base.
 
httpd.conf is a server wide solution, at the same time htaccess will work for individueal directories.

use the option as depends on your need.

not sure it is possible with vhost.conf ...
 
Back
Top