![](/img/trans.png)
[英]How to 301 Redirect old dynamic URLs to their relevant New dynamic URLs in .htaccess
[英]How to redirect dynamic urls to their relevant static urls in htaccess?
动态网址就像
example.com/wp/?2323e=467467
example.com/any-page.html?2323e=567856
example.com/any-folder/other-page.html?2323e=6435346
我想将它们全部重定向到他们的静态网址
example.com/wp/
example.com/any-page.html
example.com/any-folder/other-page.html
请使用301重定向建议如何执行此操作
要删除查询字符串,您可以使用:
RewriteEngine on
RewriteCond %{QUERY_STRING} .+ [NC]
RewriteRule ^ %{REQUEST_URI}? [L,R]
这将重定向:
/foo?querystring
至
/foo
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.