Php 如果查询字符串匹配,我想重定向到另一个url
如果匹配“Php 如果查询字符串匹配,我想重定向到另一个url,php,.htaccess,mod-rewrite,url-rewriting,url-redirection,Php,.htaccess,Mod Rewrite,Url Rewriting,Url Redirection,如果匹配“/studio/index.php?mod=search&do=confirm\u offer&offer\u id=119”我想重定向到“http://abcd.com/checkout” 两种我都试过了 http://www.abcd.com/studio/index.php?mod=search&do=confirm_offer&offer_id=119 不,不是目录。在119$之后没有第一个[L]的情况下进行测试。请报告您收到的错误(如果有)。RewriteC
/studio/index.php?mod=search&do=confirm\u offer&offer\u id=119
”我想重定向到“http://abcd.com/checkout
”
两种我都试过了
http://www.abcd.com/studio/index.php?mod=search&do=confirm_offer&offer_id=119
不,不是目录。在
119$
之后没有第一个[L]
的情况下进行测试。请报告您收到的错误(如果有)。RewriteCond
指令上的L
标志(正如Croises指出的)将导致500内部服务器错误!
#RewriteCond %{QUERY_STRING} !^http://www.fitfox.de/studio/index.php?mod=$1&do=confirm_offer&offer_id=$2 [L]
#RewriteRule ^(.*)$ http://www.fitfox.de/checkout/index.php [L,R=301]
#RewriteCond %{QUERY_STRING} ^mod=search&do=confirm_offer&offer_id=119$ [L]
#RewriteRule ^studio/index.php$ http://www.fitfox.de/checkout/ [R=301,L]