首页 > 其他 > 详细

IIS 7.5 配置伪静态

时间:2019-08-19 11:42:00      阅读:94      评论:0      收藏:0      [点我收藏+]

长时间不弄伪静态了,刚花了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:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="File" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
<add name="html" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_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限制 (允许)

 

完工

 

IIS 7.5 配置伪静态

原文:https://www.cnblogs.com/renzhituteng/p/11375713.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!