繁体   English   中英

WP生成错误的永久链接

[英]WP Generating wrong permalink

我遇到自定义帖子类型永久链接的问题。 这是我的错误:

我的帖子名称是“ wordpress论坛”,永久链接应为: http : //example.com/custom-post-type/wordpress-forum/但它总是像下面这样生成:

http://example.com/custom-post-type/something/
example.com/custom-post-type/something-1/
example.com/custom-post-type/something-2/

不是根据帖子名称生成的。

请帮助我解决该问题。

谢谢

将以下配置放入.htaccess文件

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

然后,在设置烫发链接选项的过程中,我选择了自定义结构,并指定了/index.php/%postname%

暂无
暂无

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

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