简体   繁体   English

Wordpress 永久链接 Apache mod_rewrite 启用但仍然无法正常工作

[英]Wordpress permalink Apache mod_rewrite enable but still not working

I have a server with Apache/2.4.6 (CentOS) PHP/7.3.27 and Wordpress installed.我有一台安装了 Apache/2.4.6 (CentOS) PHP/7.3.27 和 Wordpress 的服务器。

When I try to use permalinks on Wordpress, I get 404 error.当我尝试在 Wordpress 上使用永久链接时,出现 404 错误。

The rewrite module is enabled:启用重写模块:

$ httpd -M 

Output

rewrite_module (shared)

Here is my httpd.conf这是我的 httpd.conf

DocumentRoot "/var/www/html"

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

Here is my .htaccess这是我的 .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>

Everything seems to be fine, but I still get 404 error when I change Permalinks to Post Name in Wordpress admin.一切似乎都很好,但是当我在 Wordpress 管理员中将永久链接更改为帖子名称时,我仍然收到 404 错误。

I hope to get help.我希望得到帮助。

I had same problem on this and can't figure out.我对此有同样的问题,无法弄清楚。 I made backup reload and just w我做了备份重新加载,只是 w

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM