源码下载:http://www.51aspx.com/CV/UrlReWriter/
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
Code
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="CustomConfiguration" type="URLRewriter.Config.UrlsSection, URLRewriter"/>
</configSections>
<CustomConfiguration>
<urls>
<add virtualUrl="~/microsoft*.*" destinationUrl="~/default.aspx"/>
<add virtualUrl="~/microsoft*" destinationUrl="~/default.aspx"/>
<add virtualUrl="~/m/i/c/rosoft.aspx" destinationUrl="~/default.aspx"/>
<add virtualUrl="~/d(\d+)\.gv" destinationUrl="~/default.aspx?id=$1"/><!--正则转换-->
</urls>
</CustomConfiguration>
<system.web>
<httpModules>
<add type="URLRewriter.RewriterModule, URLRewriter" name="RewriterModule"/>
</httpModules>
<authentication mode="Forms"/>
<compilation debug="true"/></system.web>
</configuration>
引入dll:
ActionlessForm.dll
UrlRewriter.dll