Wordpress: I Removed Parent Slug from URL but wordpress redirects and include parent slug again

感情迁移 提交于 2019-12-11 13:18:38

问题


I have successfully removed the parent slug from URL and have reduced the URL from:

http://myexp.uphero.com/sample-page/child-sample-page/

to

http://myexp.uphero.com/child-sample-pagee/

This is a test wordpress website for testing purposes. But when I visit the newly reduced URL, the old URL (with parent slug) appears again in the browser's URL bar. Please help me, why this it is including the parent slug again in the URL? I have search around the web but didn't find solution. Also, I have written the following rewrite rule for the reduced URL

^child-sample-pagee/?$' => '/index.php?pagename=child-sample-page'

The rewrite rule also works well, without any problem. Just visit the above newly created reduced link, and you will see the actual problem. Waiting for response and solution.

来源:https://stackoverflow.com/questions/22283030/wordpress-i-removed-parent-slug-from-url-but-wordpress-redirects-and-include-pa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!