wordpress固定连接(“有点尴尬诶!该页无法显示”和404

2019-06-27  本文已影响0人  周末不加班

问题说明

文章自动生成的连接较复杂且可能带有中文,更改 仪表盘—设置—固定连接后出现一下问题:

验证mod_rewrite

httpd -M
vi /etc/httpd/conf.modules.d/00-base.conf
LoadModule rewrite_module modules/mod_rewrite.so

修改Apache配置文件

vi /etc/httpd/conf/httpd.conf
#
# 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 //改为 AllowOverride All
 systemctl restart httpd

设置固定连接

无法创建.htaccess文件

vi  .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
chmod 660 .htaccess 
上一篇 下一篇

猜你喜欢

热点阅读