aspx后缀映射成html
生活随笔
收集整理的這篇文章主要介紹了
aspx后缀映射成html
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
1.網(wǎng)站的配置文件添加如下代碼:?
<configuration> <configSections><section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" /></configSections><RewriterConfig><Rules><RewriterRule><LookFor>/Index.html</LookFor><SendTo>/Index.aspx</SendTo></RewriterRule><RewriterRule><LookFor>/Enterprise/Login.html</LookFor><SendTo>/Enterprise/Login.aspx</SendTo></RewriterRule><RewriterRule><LookFor>/Government/Login.html</LookFor><SendTo>/Government/Login.aspx</SendTo></RewriterRule><RewriterRule><LookFor>/Government/Main.html</LookFor><SendTo>/Government/Main.aspx</SendTo></RewriterRule><RewriterRule><LookFor>/Enterprise/Main.html</LookFor><SendTo>/Enterprise/Main.aspx</SendTo></RewriterRule></Rules></RewriterConfig><system.web><httpHandlers><add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" /><add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" /></httpHandlers><httpModules><add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/></httpModules></system.web> </configuration> 配置文件?
?2.IIS里面進(jìn)入》處理程序映射模塊》添加腳本映射》
請求路徑:*.html
可執(zhí)行文件:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll
名稱:htmlx64
請求限制:不勾選
然后確認(rèn)就OK
?
3.代碼內(nèi)部的跳轉(zhuǎn)只要是跳轉(zhuǎn)到*.aspx的都換成*.html (url地址)
轉(zhuǎn)載于:https://www.cnblogs.com/ingstyle/p/5233868.html
總結(jié)
以上是生活随笔為你收集整理的aspx后缀映射成html的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 第一天--来个占位符,让自己有一席之地
- 下一篇: 第六天实习报告