一个PHP伪静态的规则,求大虾帮我喵喵
是这样的,我在本地测试是行的,我本地的服务器是Apache的,然后我买的空间是IIS的服务器,
所以就需要写个httpd.ini,但是我弄了,线上还是不行,所以我就找大虾们帮我看看问题在哪里。
我要的规则是
http://www.example.com/category/list-1.html http://www.example.com/plus/list.php?tid=$1 http://www.example.com/category/list-2-24-2.html http://www.example.com/plus/list.php?tid=2&totalresult=24&PageNo=2 http://www.example.com/archives/view-13-1.html http://www.example.com/view.php?arcID=13&pageno=1 http://www.example.com/index.html http://www.example.com/index.php
这是本地Apche服务器的.htaccess规则,这个在本地测试规则没有问题:
RewriteEngine On RewriteBase / RewriteRule ^category/list-([0-9]+).html$ /plus/list.php?tid=$1 RewriteRule ^category/list-([0-9]+)-([0-9]+)-([0-9]+).html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3 RewriteRule ^archives/view-([0-9]+)-([0-9]+).html$ /plus/view.php?arcID=$1&pageno=$2 RewriteRule ^index.html$ index.php然后下面是IIS服务器(windows2003,IIS6,空间是支持伪静态的)的httpd.ini规则,这个规则有问题,我要大虾帮忙看的就是下面的规则,谢谢:
[ISAPI_Rewrite] # Defend your computer from some worm attacks RewriteRule .*(?:global.asa|default.ida|root.exe|..).* . [F,I,O] RewriteRule ^(.*)/category/list-([0-9]+).html$ $1/plus/list.php?tid=$1 RewriteRule ^(.*)/category/list-([0-9]+)-([0-9]+)-([0-9]+).html$ $1/plus/list.php?tid=$1&totalresult=$2&PageNo=$3 RewriteRule ^(.*)/archives/view-([0-9]+)-([0-9]+).html$ $1/plus/view.php?arcID=$1&pageno=$2 RewriteRule ^(.*)/index.html index.php
安装了的