简体   繁体   English

WP生成错误的永久链接

[英]WP Generating wrong permalink

I am facing a problem custom post type permalink. 我遇到自定义帖子类型永久链接的问题。 Here is my error: 这是我的错误:

My post name is "wordpress forum" permalink should be: http://example.com/custom-post-type/wordpress-forum/ But it's always generating like below: 我的帖子名称是“ wordpress论坛”,永久链接应为: http : //example.com/custom-post-type/wordpress-forum/但它总是像下面这样生成:

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

Not generating from post name. 不是根据帖子名称生成的。

Please help me to fix that. 请帮助我解决该问题。

Thanks 谢谢

Put the below configuration to .htaccess file 将以下配置放入.htaccess文件

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

and then, during setting the perm link option, I choose the custom structure and gave /index.php/%postname% 然后,在设置烫发链接选项的过程中,我选择了自定义结构,并指定了/index.php/%postname%

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

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