日期:2018年8月28日
问题:NOT FOUND the request url /wordpress/category/topic/ was not found on this server.
解决:
服务器url rewrite模块未安装或未开启。
在Nginx上为WordPress固定链接配置Rewrite: http://www.bjhee.com/nginx-rewrite.html
官方文档参考设置:https://codex.wordpress.org/Nginx
实际使用apache
解决,修改服务器/etc/httpd/conf/httpd.conf文件。安装启动rewrite模块。
1.开启rewrite_module。查找以下语句,去掉前面的#。启动。若无该语句,在LoadModule模块的最后一句后面加上。
LoadModule rewrite_module modules/mod_rewrite.so
2.修改以下代码中“ AllowOverride None” 为“ AllowOverride All”
<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.4/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 None
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
网友评论