wangdetian168 发表于 2013-1-15 22:46:51

asp.net重写静态页面地址的使用

asp.net重写静态页面地址的使用
web.config的使用
1.
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/(\d+).htmls</LookFor>
<SendTo>~/Default.aspx?cn=$1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Default_(\d+).jsp</LookFor>
<SendTo>~/Default.aspx?cn=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<system.web>

<httpModules>
<add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter" />
</httpModules>
2.在iis中加缓存isapi扩展
点掉确认文件是否存在
页: [1]
查看完整版本: asp.net重写静态页面地址的使用