How to make index.html default instead of index.php?

How to make index.html default instead of index.php?  

Put a .htaccess file in your web root directory, if there isn't one yet.

Then add the line:

DirectoryIndex index.html index.htm index.php

or change it accordingly.
That line tells apache what file to look at first when it is not specified in the URL, in the same order that you put it after DirectoryIndex.

In this example it would first look for index.html, load it if found, if not look for index.htm, load it if found, and if not load index.php. 

Comments