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/ 呢? 所以这两个有矛盾。
“如何将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/ 呢? 所以这两个有矛盾。
RewriteRule /(\d)/product http://www.mysite.com/test/index.php?id=$1
这样试试