Hosts设置 w11.gongzhonghao.cn 到 127.0.0.1
Windows的XAMPP,Apache版本 2.4
RewriteEngine On
RewriteCond %{QUERY_STRING} (.*)mod=wsplist(.*) [NC] #该Cond为何未生效?
RewriteRule . - [L]
RewriteCond %{HTTP_HOST} ^w(\d+).gongzhonghao.cn$ [NC]
RewriteRule .
http://w%1.gongzhonghao.cn/wz.php?mod=wsplist&wspid=%1 [L]
结果就是(访问根目录w11.gongzhonghao.cn后抓包):
/
http://w11.gongzhonghao.cn/wz.php?mod=wsplist&a=h&wspid=11http://w11.gongzhonghao.cn/wz.php?mod=wsplist&a=h&wspid=11....
....
为什么QUERY_STRING没有匹配成功?匹配成功的话
RewriteRule . - [L]
这句应该会阻止循环重定向才对的吧?