一、添加引用
URLRewriter.dll
二、<configuration>输入下插入以下代码 程序代码
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections>
<RewriterConfig>
<Rules>
<!-- Rules for Blog Content Displayer -->
<RewriterRule>
<LookFor>~/pro-(.[0-9]*)\.html</LookFor>
<SendTo>~/pro.aspx?ID=$1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/index\.html</LookFor>
<SendTo>~/default.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>
四、点击下载:
rewrite_dll.rar 本文作者:网友 来源:网络
CIO之家 www.ciozj.com 微信公众号:imciow