开发者

Rewrite Specific Querystring URL

开发者 https://www.devze.com 2023-02-22 19:39 出处:网络
Lets say I have a URL as follows: http://www.testing.com/?id=1234 I want to take that specific URL and specific querystring and 301 re开发者_如何学Pythondirect ONLY it with a RewriteRule.So, http://w

Lets say I have a URL as follows: http://www.testing.com/?id=1234

I want to take that specific URL and specific querystring and 301 re开发者_如何学Pythondirect ONLY it with a RewriteRule. So, http://www.testing.com/?id=12345 would not be redirected


Try this:

RewriteCond %{QUERY_STRING} id=1234$
RewriteRule (.*) /some/newurl [R=301,L]

Hope this helps

0

精彩评论

暂无评论...
验证码 换一张
取 消