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: |
Also Read