asp.net 伪静态(URL重写)配置,解决了回发问题。
1.新建文件夹:App_Browsers ,创建文件 form.browser ,内容如下:
2.引用组件:UrlRewriter.dll 下载:urlrewrite.dll
3.配置文件加入:
<configuration>
<configSections>
<section name="CustomConfiguration" type="URLRewriter.Config.UrlsSection, URLRewriter"/>
</configSections>
<CustomConfiguration>
<urls>
<add virtualUrl="~/default.html" destinationUrl="~/default.aspx"/>
</urls>
</CustomConfiguration>
<system.web>
<httpModules>
<add type="URLRewriter.Module.RewriterModule, URLRewriter" name="RewriterModule"/>
</httpModules>
<authentication mode="Forms"/>