Client Login

I have two index files under public_html. Apache is picking one with the .html extension. How can I change its order?

Apache's 'DirectoryIndex' directive is used for this purpose. On our servers we have 'index.html index.htm index.php ....' set as the default order of files to look for when someone browses to your domain. You can change it to your choice. Say you want index.php to be loaded by default. Then you need to add the following line in your .htaccess file:

DirectoryIndex index.php index.html index.htm

The .htaccess file is usually placed under the 'public_html' directory of your account. If it is not there, you can create one.

Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read