从 windows 迁移到 linux 服务器后,Wordpress 所有内页返回 404

Wordpress all inner pages returning 404 after migrating to linux server from windows

我已将我的站点 http://www.mahodadhiinfra.com/ 最近从 windows 托管迁移到 linux 托管。 在正确托管和配置主页 运行 之后,但无法访问任何其他页面。我只能访问带有扩展名的页面。

例如。 http://www.mahodadhiinfra.com/wp-login.php(工作中) http://www.mahodadhiinfra.com/my-account/lost-password/(不工作)

最初我认为这可能是 .htaccess 的问题,但我的 .htaccess 似乎没问题。

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

# END WordPress

之后我尝试更改永久链接。但没有任何效果。托管服务提供商确认所有设置都已打开 wordpress 所需的内容,例如AllowOverride ALL 等

谁能帮我解决这个问题?

只需 3 个步骤即可帮助您:

  1. 删除 .htaccess 文件
  2. 登录/wp-admin/
  3. 转到永久链接选项并单击 "Save"。