RewriteRule   /(\d)   /test/index\.php\?id=$1对于第二种:
“如何将http://www.mysite.com/0到9十个数字/product 
重写到http://www.mysite.com/test/index.php?id=2 ”那http://www.mysite.com/test/index.php?id=2 到底是请求
http://www.mysite.com/2/product 呢?还是请求 http://www.mysite.com/2/ 呢? 所以这两个有矛盾。

解决方案 »

  1.   

    RewriteRule       /(\d)       /test/index.php?id=$1 
    RewriteRule       /(\d)/product  http://www.mysite.com/test/index.php?id=$1 
    这样试试
      

  2.   

    感觉 Aylazhang 想得有点过多,现在应该是Modulerewrite方式变成url方式请求的,Appach先把 请求的类http://www.mysite.com/2/product解释成 http://www.mysite.com?id=...形式进行请求的。