[英]Remove specific folder from URL htaccess
We have changed URL structure and I want to do the following: 我们更改了网址结构,我想执行以下操作:
User visits /p/Rounders/Rounders-84-Backstopping
用户访问
/p/Rounders/Rounders-84-Backstopping
301 Redirect to /Rounders/Rounders-84-Backstopping
301重定向到
/Rounders/Rounders-84-Backstopping
However, we do have other URLs that this shouldn't affect, so it needs to check for /p/
present in the URL. 但是,我们还有其他不应该影响的URL,因此它需要检查URL中是否存在
/p/
。
Any ideas for the .htaccess file? .htaccess文件有什么想法吗?
您可以将此规则用作第一条规则:
RewriteRule ^p/(.+)$ /$1 [L,R=301,NC,NE]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.