把 http://www.9199mr.com/area_provice.php?id=1 这个重写成:beijing.city.9199mr.com
http://www.9199mr.com/area_provice.php?id=2 这个重写成:anhui.city.9199mr.com这种的用重写能不能办的到啊。请高手帮忙一下。

解决方案 »

  1.   

    RewriteRule ^anhui.city.9199mr.com$ http://www.9199mr.com/area_provice.php?id=2
    RewriteRule ^beijing.city.9199mr.com$ http://www.9199mr.com/area_provice.php?id=1
      

  2.   

    RewriteRule ^http:\/\/anhui\.city\.9199mr\.com$ http://www.9199mr.com/area_provice.php?id=2
    RewriteRule ^http:\/\/beijing\.city\.9199mr\.com$ http://www.9199mr.com/area_provice.php?id=1
      

  3.   

    RewriteRule ^anhui.city.9199mr.com$ http://www.9199mr.com/area_provice.php?id=2
    RewriteRule ^beijing.city.9199mr.com$ http://www.9199mr.com/area_provice.php?id=1 
     
      

  4.   

    如果你是根据id值来动态判断的话,你的地址最好弄成。
    http://www.9199mr.com/area_provice.php?area=anhui这样。然后一条RewriteRule 就可以匹配所有的了。