以前网站是asp的,现在换成php的了,想把原来的地址转到php页上。
如news.asp?id=123 需要把它定向到 news/123.html
这个用 RewriteRule 怎么写啊?
RewriteRule ^news\.asp\?id=(\d+)$ news/$1.html [L]这个好像不行。有没有人帮忙搞定一下。

解决方案 »

  1.   

    高手你好,俺想问问你RewriteCond能否作用于多条RewriteRule,怎样实现 ?
      

  2.   

    看看能不能传递uri部分的值,然后分两步,先把uri给截出来,然后交给下一个RewriteRule处理
      

  3.   

    RewriteCond %{QUERY_STRING} ^id=(.[^&]+)
    RewriteRule news\.php$ news/%1.html [L]