【问题标题】:Wordpress Custom post type permalink with a hyphen separated slug returns a 404 error带有连字符分隔的 slug 的 Wordpress 自定义帖子类型永久链接返回 404 错误
【发布时间】:2020-08-11 14:44:33
【问题描述】:

我有一些帖子类型返回 404 错误,其中 slug 是由连字符“posttype/item-one”分隔的多个单词。

使用自定义帖子类型 UI。

我认为这与下面的 .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

我是否需要''自定义重写 slugin 自定义帖子类型设置。

【问题讨论】:

  • 进入永久链接并更新我认为它会起作用
  • 固定链接设置为“帖子名称”但不起作用。
  • 你能发一些网址以便查看
  • 在复制代码并下载到本地之前,只需从 htacess 中删除所有代码,将 htacess 保存为空白,然后转到永久链接并更新

标签: wordpress .htaccess http-status-code-404 custom-post-type permalinks


【解决方案1】:

发现更改为新的客户帖子类型 ui slug 解决了该问题。 “猫”作为蛞蝓引起了问题。

【讨论】:

    猜你喜欢
    • 2014-08-28
    • 1970-01-01
    • 2014-05-17
    • 2012-05-05
    • 2011-12-05
    • 1970-01-01
    • 2017-06-26
    • 1970-01-01
    • 2014-05-20
    相关资源
    最近更新 更多