I have a website on a server. The homepage is example.com/index.php .
OK, I uploaded an index.html named file to the server (the root dir) and when I typed in my site’s domain into the browser’s URL bar, I was suprised, because the index.html page loaded.
(example.com->example.com/index.html)
So not what I wanted.
My question:
Why did that happen? Why does index.html have advantage 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
.htmlvariation takes precedence due to the fact that it’s the most basic web format.If you’re using Apache, just check the default
.htaccesssetup:You can edit that and make it fit your needs.