在配置iis伪静态之前我们需要下载百度去下载两个文件分别是IisUrl Rewriter.dll和IisUrl Rewriter.ini保存在电脑中
选择“ISAPI筛选器”,然后选择“添加”:
在“添加/编辑筛选器属性”对话框中,点击“浏览”:
在这里,选择刚才解压出来的IisUrlRewriter.dll
点击“确定”结束设置:
如果设置没有生效,你需要重启IIS
测试配置是否成功
找到ISAPI Rewrite 安装完的目录那个配置文件 貌似 httpd.ini 加完了下面的代码重新哈iis服务
[ISAPI_Rewrite]
代码如下# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteRule ^/index.html$ /index.php [L]
RewriteRule ^/([a-zA-Z]+).html$ /?ac=$1 [I]
RewriteRule ^/([a-zA-Z]+)-cid-([0-9]+).html$ /?ac=$1&cid=$2 [I]
RewriteRule ^/([a-zA-Z]+)-cid-([0-9]+)-page-([0-9]+).html$ /?ac=$1&cid=$2&page=$3 [I]
RewriteRule ^/([a-zA-Z]+)-id-([0-9]+).html$ /?ac=$1&id=$2 [I]
RewriteRule ^/([a-zA-Z]+)-name-([a-zA-Z]+).html$ /?ac=$1&name=$2 [I]
RewriteRule ^/([a-zA-Z]+)-name-([a-zA-Z]+)-page-([0-9]+).html$ /?ac=$1&name=$2&page=$3 [I]
小提示apache中的伪静态不可直接复制过来,需要作简单的修改哦。
http://m.bbyears.com/qiyexinxihua/37423.html
推荐访问: