最近一哥们网站原来用的是WIN2003服务器。后来换空间以后IIS为8.0的。服务商说只支持web.config。规则要改变。无语啊。都没弄过这个。经过搜索和研究终于搞定。被大家说得太复杂了。其实参考下觉得并不太难
原有Rewrite
代码如下 |
复制代码 |
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteRule ^/index.html$ /index.php [N,I]
RewriteRule ^(.*)/index.html $1/index.php [I]
RewriteRule ^(.*)/page([0-9]+).html $1/index.php?gid=$2 [I]
RewriteRule ^(.*)/list-([0-9]+).html $1/index.php?PageNo=$2 [I]
RewriteRule ^(.*)/show-aid([0-9]+).html $1/show.php?uid=$2 [I]
|
更改以后的web.config