【问题标题】:Wordpress permalink Apache mod_rewrite enable but still not workingWordpress 永久链接 Apache mod_rewrite 启用但仍然无法正常工作
【发布时间】:2021-06-12 07:07:46
【问题描述】:

我有一台安装了 Apache/2.4.6 (CentOS) PHP/7.3.27 和 Wordpress 的服务器。

当我尝试在 Wordpress 上使用永久链接时,出现 404 错误。

重写模块已启用:

$ httpd -M 

Output

rewrite_module (shared)

这是我的 httpd.conf

DocumentRoot "/var/www/html"

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    Require all granted
    AllowOverride All
<Directory>

这是我的 .htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

一切似乎都很好,但是当我在 Wordpress 管理员中将永久链接更改为 帖子名称 时,我仍然收到 404 错误。

我希望得到帮助。

【问题讨论】:

  • Wordpress 5.7 版

标签: php wordpress apache mod-rewrite permalinks


【解决方案1】:

我对此有同样的问题,无法弄清楚。我做了备份重新加载,只是 w

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-08-12
    • 2011-06-16
    • 2013-05-21
    • 2016-01-06
    • 2012-03-18
    • 1970-01-01
    • 1970-01-01
    • 2014-07-21
    相关资源
    最近更新 更多