wordpress 404-一次到404,一次到主页

wordpress 404-一次到404,一次到主页,wordpress,http-status-code-404,Wordpress,Http Status Code 404,我的网站中的404有问题。 我没有建立网站,只是解决了一些问题 我使用的是默认的permalink结构,在我的主题文件夹中有一个404.php。 我的.htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d

我的网站中的404有问题。 我没有建立网站,只是解决了一些问题

我使用的是默认的permalink结构,在我的主题文件夹中有一个404.php。 我的.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>

重新启动发动机
重写基/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]
问题是: 当我将URL更改为
/?page_id=“不存在的页码”
-我得到404页, 但是,当我写一些信(例如,
/sjkhdk
)时,我会看到主页(我希望他们都能看到404页)

有什么想法吗

谢谢,
Tal

每当我遇到permalinks问题时,这个过程通常会解决它

  • 确保.htaccess可由Web服务器写入
  • 进入
    Settings>Permalinks
    ,只需点击SaveChanges。这将在内部重置wordpress永久链接

  • 让我知道这是否有效。

    WP是最新的吗?它是什么版本的?您在@user1629677上试用过吗?