wampserver服务器上,打开localhost无法显示更新的index.html
httpd.conf----调整index.html和index.php运行顺序即可
<Directory /xxx>
DirectoryIndex index.html index.htm index.php index.php3
</ Directory>
如果上述设置后仍无法按顺序运行首页,那么还得修改一下php相关配置文件php.conf
/etc/httpd/conf.d/php.conf文件中的
DirectoryIndex index.php
上面是甚至index.php 优先,如果把DirectoryIndex index.php去掉,则index.html,应该也可以改成DirectoryIndex index.html 或者DirectoryIndex index.html index.php
保存重启服务器,不必清除浏览器缓存。
本文介绍如何调整WAMPServer的httpd.conf和php.conf配置文件,以正确加载index.html作为首页,而非默认的index.php。通过修改DirectoryIndex指令顺序和确保php配置正确,可以解决无法显示更新后的index.html页面的问题。
1510

被折叠的 条评论
为什么被折叠?



