wordpress设置固定连接后,打不开网站
2015-08-28 11:08
309 查看
作者:www.gudianxiaoshuo.com
rewrite是apache环境的一个伪静态功能了,如果我们没有没让Apache开启rewrite功能,网站上所有的rewrite规则都不可使用
开启过程如下:
centos的配置文件放在: /etc/httpd/conf/httpd.conf
打开文件找到:
LoadModule rewrite_module modules/mod_rewrite.so
将前面“#”去掉,如果不存在则添加上句。
如果你的网站是根目录的话:找到
Options FollowSymLinks
AllowOverride None
将上面的None改为All
如果你的站点不在根目录,设置如下:
Order allow,deny
Allow from all
AllowOverride All
OK,然后重启服务器,service httpd restart ,这样。htaccess就可以使用了。
遇到的问题:
一开始我就是按照网上的资料这么设置的,但是怎么也修改不了固定连接,一设置为固定连接,就打不开。
今天我又尝试设置了下
发现 AllowOverride None 不仅以处有,要修改两处 才管用
第一处
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
第二处 紧跟着第一处
#
<Directory "/var/www/html">#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
然后 :wq保存后
重启APPACH
service httpd restart
就可以了
rewrite是apache环境的一个伪静态功能了,如果我们没有没让Apache开启rewrite功能,网站上所有的rewrite规则都不可使用
开启过程如下:
centos的配置文件放在: /etc/httpd/conf/httpd.conf
打开文件找到:
LoadModule rewrite_module modules/mod_rewrite.so
将前面“#”去掉,如果不存在则添加上句。
如果你的网站是根目录的话:找到
Options FollowSymLinks
AllowOverride None
将上面的None改为All
如果你的站点不在根目录,设置如下:
Order allow,deny
Allow from all
AllowOverride All
OK,然后重启服务器,service httpd restart ,这样。htaccess就可以使用了。
遇到的问题:
一开始我就是按照网上的资料这么设置的,但是怎么也修改不了固定连接,一设置为固定连接,就打不开。
今天我又尝试设置了下
发现 AllowOverride None 不仅以处有,要修改两处 才管用
第一处
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
第二处 紧跟着第一处
#
<Directory "/var/www/html">#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
然后 :wq保存后
重启APPACH
service httpd restart
就可以了
相关文章推荐
- 一个好用的在线正则网站
- VS2010 Web网站发布详解
- 抢购系统架构设计原理参考文档
- Hive视频教程|hive企业级架构课程
- 网站SEO中的的三个误区ccxtqj
- 20Lync2013升级到SkypeForBusiness2015进阶篇--SFB后端Mirror高可用切换测试
- Hive架构视频教程|hive教程下载
- Android 架构设计的思想与原则是什么?
- Hive企业架构视频课程
- fans-rt 0.11内核架构设计缺陷分析
- 架构师当聚焦于边界与接口
- 网站搭建过程中后台相关 随笔
- 网站搭建过程中后台相关 随笔
- android体系架构
- 从Hadoop到Spark的架构实践
- 网页级在线性能测试网站汇总
- 从12306谈起验证码的架构
- IT 架构和应用程序的端到端测试
- JAVA集锦(三)--Model1、Model2、三层架构的华丽转变
- Linux目录树架构示意图