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

后端 未结 5 570
被撕碎了的回忆
被撕碎了的回忆 2020-11-30 05:48

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 sit

5条回答
  •  余生分开走
    2020-11-30 06:33

    @kuroir is right, that depends on the web server configuration, in Apache it's the DirectoryIndex:

    DirectoryIndex index.html index.php index.cgi
    

    That will give priority to .html files over .php files, and priority to .php files over .cgi files.

提交回复
热议问题