Apache:设置首页运行index.htmlindex.php的顺序

Apache:设置首页运行index.htmlindex.php的顺序
编辑httpd.conf文件,找到DirectoryIndex在后面加一个index.php。
例如,我把DirectoryIndex这行改为:DirectoryIndex index.html index.htmindex.php index.html.var
保存编辑的内容,重新启动Apache就可以实现了。

<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 优先,如果把DirectoryIndexindex.php去掉,则index.html,应该也可以改成DirectoryIndex index.html或者DirectoryIndex index.html index.php

  

爱华网本文地址 » http://www.aihuau.com/a/25101018/372694.html

更多阅读

怎么打开QQ的迷你新闻首页 qq新闻迷你首页弹窗

怎么打开QQ的迷你新闻首页——简介每天登陆QQ之后会看一下QQ的迷你新闻,已经成为我的一种习惯,可如果当你发现在登录QQ之后不显示当天的QQ迷你新闻首页,会让我觉得好像缺少点什么,现在小编来介绍一下怎么打开QQ迷你新闻首页;怎么打开QQ

怎样下载百度首页的皮肤图片 百度首页怎么换皮肤

怎样下载百度首页的皮肤图片——简介百度新首页有许多款漂亮的皮肤,让人爱不释手。如果很喜欢其中的一两款,想用来作为桌面,那么,怎样下载这些皮肤图片呢?怎样下载百度首页的皮肤图片——工具/原料Chrome 浏览器怎样下载百度首页的皮肤

声明:《Apache:设置首页运行index.htmlindex.php的顺序》为网友玥號娶尓分享!如侵犯到您的合法权益请联系我们删除