[英].htaccess 302 redirect url with php parametr to other website
有人可以告訴我它是否可以正常工作嗎?
我需要重定向302個網頁:
http://www.mysite.domain.net/?click=url
http://www.mysite.domain.net/?url=anotherurl&version=1&reflink=base
到網頁http://othersite.otherdomain.com
RewriteEngine on
RewriteCond %{QUERY_STRING} ^(.*&)?click=url$
RewriteCond %{QUERY_STRING} ^(.*&)?url=program&version=1&reflink=base
RewriteRule ^$http://othersite.otherdomain.com [L, NC]
RewriteCond
行之間使用[OR]
。 RewriteRule
語法錯誤。 R
標志前的空格將導致500。 嘗試以下規則:
RewriteEngine on
RewriteCond %{QUERY_STRING} (^|&)click=url(&|$) [OR]
RewriteCond %{QUERY_STRING} (^|&)url=program&version=1&reflink=base(&|$)
RewriteRule ^/?$ http://othersite.otherdomain.com/? [L,NC,R=302]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.