长时间不弄伪静态了,刚花了1-2个小时研究弄了下
一、 iis安装 URLRewrite
下载地址:http://www.iis.net/download/URLRewrite
二、
web.config 添加
<system.webServer>
<handlers>
<add name="html3" path="*" verb="*" type="System.Web.UI.PageHandlerFactory" resourceType="File" preCondition="integratedMode" />
<add name="html2" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet_isapi.dll" resourceType="File" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
<add name="html" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="C:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet_isapi.dll" resourceType="File" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
</handlers>
</system.webServer>
三、web.config添加映射规则
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1">
<match url="^userinfo-([0-9]+).html$" ignoreCase="false" />
<action type="Rewrite" url="userinfo.aspx?userid={R:1}" appendQueryString="false" />
</rule>
</rewrite>
</system.webServer>
四、站点的应用程序池设置为经典模式
五、检查asp.net v4.0 isapi和cgi限制 (允许)
完工