IIS 7.5下如何实现.NET的伪静态
发布时间:2015-09-02 21:57 浏览量:人
方法一:在IIS上设置
1、 打开iis,选中要设置伪静态的站点–处理程序映射–到右边添加脚本映射。
2、 请求路径填写 *.htm或者*.html (根据你的需要)
3、 可执行路径填写c:windowsmicrosoft.netframeworkv2.0.50727aspnet_isapi.dll
4、 名称可以自定一个 我这里写 aspx-htm
5、请求限制–谓词–下列谓词:GET,HEAD,POST,DEBUG–确定
6、确定
方法二:通过web.config 配置
1、编辑网站目录下的web.config
2、找到红色字体部分,插入黑色字体部分即可。
<?xml version=”1.0″ encoding=”UTF-8″?>
<configuration>
<system.webServer>
<handlers>
<add name=”aspx-htm” path=”*.htm” verb=”GET,HEAD,POST,DEBUG” modules=”IsapiModule” scriptProcessor=”C:WindowsMicrosoft.NETFrameworkv2.0.50727aspnet_isapi.dll” resourceType=”Unspecified” preCondition=”classicMode,runtimeVersionv2.0,bitness32″ />
</handlers>
</system.webServer>
</configuration>
- 上一篇:虚拟主机量是怎么计算的
- 下一篇:如何为主机设置伪静态