您好,欢迎访问一九零五行业门户网

.htaccess中设立 RewriteCond %{HTTP_HOST} 不起作用

.htaccess中设置 rewritecond %{http_host} 不起作用
rewriteengine on
rewritecond %{http_host} ^aaa$ [nc]
rewriterule ^([a-za-z]+/)+list-([0-9]+)-([0-9]+).html index.php?m=content&c=index&a=lists&catid=$2&page=$3
rewriterule ^([a-za-z]+/)+show-([0-9]+)-([0-9]+)-([0-9]+).html index.php?m=content&c=index&a=show&catid=$2&id=$3&page=$4
rewritecond %{http_host} ^bbb$ [nc]
rewriterule ^([a-za-z]+/)+list-([0-9]+)-([0-9]+).html index.php?m=wap&c=index&a=lists&catid=$2&page=$3
rewriterule ^([a-za-z]+/)+show-([0-9]+)-([0-9]+)-([0-9]+).html index.php?m=wap&c=index&a=show&catid=$2&id=$3&page=$4
========================================
bbb是个手机站,地址跟aaa是不一样的
这样设置之后,访问bbb还是使用aaa的规则,rewritecond %{http_host}没起作用呀,麻烦帮俺看看,谢谢。
------解决思路----------------------
rewriteengine on
rewritecond %{http_host} ^aaa$
rewriterule ^([a-za-z]+/)+list-([0-9]+)-([0-9]+).html index.php?m=content&c=index&a=lists&catid=$2&page=$3 [nc]
rewriterule ^([a-za-z]+/)+show-([0-9]+)-([0-9]+)-([0-9]+).html index.php?m=content&c=index&a=show&catid=$2&id=$3&page=$4 [nc]
rewritecond %{http_host} ^bbb$
rewriterule ^([a-za-z]+/)+list-([0-9]+)-([0-9]+).html index.php?m=wap&c=index&a=lists&catid=$2&page=$3 [nc]
rewriterule ^([a-za-z]+/)+show-([0-9]+)-([0-9]+)-([0-9]+).html index.php?m=wap&c=index&a=show&catid=$2&id=$3&page=$4 [nc]
其它类似信息

推荐信息