ewblgo

  

目标:服务器的根目录wwwroot下有三个文件index.php index.html index.htm,要求输入http://localhost时默认访问index.php这个文件。
appache配置方法
不管是Linux版的还是Windows版的配置方法基本一样,在你的安装appache的目录下找到httpd.conf 这个配置文件,
找到以下这段:
<IfModule dir_module>
    DirectoryIndex index.php index.html index.htm
</IfModule>

在DirectoryIndex  后面写上你要设置的默认主页index.php名称就可以了,如下:

<IfModule dir_module>
    DirectoryIndex index.php
</IfModule>

这种配置会解释 index.php。

需要注意的地方:改动httpd.conf文件后,要重启一下appache。

 

 

本文首发WBlog博客,欢迎转载!转载请注明本文地址,谢谢。


本文地址:http://www.w3note.com/web/20.html

分类:

技术点:

相关文章:

  • 2021-10-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-22
  • 2022-12-23
  • 2021-08-31
  • 2022-01-31
相关资源
相似解决方案