web.conf配置文件的格式
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1">
<match url="ShowProduct/([0-9]*).html"/>
<action type="Rewrite" url="/view.asp?id={R:1}" />
</rule>
<rule name="Imported Rule 2">
<match url="about_([0-9]*).html"/>
<action type="Rewrite" url="/about.asp?id={R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
配置web.config文件由其它规则导入时要调整的地方:
1、match语句最前面不需要加“/”如:
<match url="/ShowProduct/([0-9]*).html"/>
修改为:
<match url="ShowProduct/([0-9]*).html"/>(注:去掉了最前面“/”)
2、action语句内不要使用转义符号。如:
<action type="Rewrite" url="/view\.asp\?id={R:1}" />
修改为:
<action type="Rewrite" url="/view.asp?id={R:1}" />(注:去掉了“.”与“?”的转义符号,“&”符号写成“&”)
IIS7.0中伪静态配置说明
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
上一篇:安卓签名
下一篇:4招帮你卸载隐藏的网卡

提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
rocky9 配置静态ip
配置Rocky Linux 9 静态IP地址
配置文件 IP 加载 -
关于IIS7.0(Internet Information Services)的特性和配置
IIS 7.0特性;管道模式
iis windows service asp.net asp IIS -
IIS7.0下URLRewriter的配置
IIS7.0下URLRewriter的配置
URLRewriter IIS7 正常运行 解决方案 url重写