我想从
重定向特定的网址http://www.domain.com/com/page.asp?id=99
to
https://www.domain.com/de/directory/
以及来自
的所有网址http://www.domain.com/com/page.asp
to
https://www.domain.com/de/
我尝试了一些重定向但我无法正确完成它。 请帮帮我!
RewriteCond %{query_string} id=5
RewriteRule (.*) https://www.domain.com/de/directory/? [R=301,L]
this works, but the biggest problem is all urls in the cms https://www.domain.com/cms are redirected too if they contain an id
答案 0 :(得分:1)
尝试:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^id=99$
RewriteRule ^page\.asp$ /de/directory/ [L,R]
RewriteRule ^page\.asp$ /de/ [L,R]