Why does index.html have priority over index.php?

It really depends on the Server you’re using. This is a matter of configuration. It’s not that there’s any advantage from using html vs php filetype.

You could say that the .html variation takes precedence due to the fact that it’s the most basic web format.

If you’re using Apache, just check the default .htaccess setup:

DirectoryIndex index.html index.shtml index.php index.htm default.html Default.htm default.html Default.html default.shtml Default.shtml page1.html index.pl index.cgi index.php3 index.phtml home.htm home.html home.shtml index.wml

You can edit that and make it fit your needs.

Leave a Comment