![](/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.