简体   繁体   English

使用.htaccess从URL更改Wordpress插件

[英]Change wordpress slug from url using .htaccess

I am developing website using wordpress. 我正在使用wordpress开发网站。 I have slug something like 我如

www.example.com/topic/topic1/content-of-topic1 www.example.com/topic/topic1/content-of-topic1

Whenever any user try to go above page, It should point to 每当任何用户尝试转到页面上方时,都应指向

www.example.com/topic1/content-of-topic1 www.example.com/topic1/content-of-topic1

I tried to change using htaccess: 我试图使用htaccess进行更改:

RewriteRule ^topic/topic1/(.*)   topic1/$1   [L]

Seems not working. 似乎无法正常工作。 Anyone know how to change this? 有人知道如何更改吗?

Thank you 谢谢

尝试将[L]更改为[P]最终代码:

RewriteRule ^topic/topic1/(.*)   topic1/$1   [P]

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

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