日期:2014-05-17 浏览次数:20553 次
<?xml version="1.0"?> <!-- 有关如何配置 ASP.NET 应用程序的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration> <configSections> <section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" /> </configSections> <RewriterConfig> <Rules> <RewriterRule> <LookFor>~/d(\d+)\.aspx</LookFor> <SendTo>~/default.aspx?id=$1</SendTo> </RewriterRule> </Rules> </RewriterConfig> <system.web> <httpHandlers> <add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" /> <add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" /> </httpHandlers> </system.web>
<RewriterRule> <LookFor>~/d(\d+)\.aspx</LookFor> <SendTo>~/default.aspx?id=$1</SendTo> </RewriterRule>
------解决方案--------------------
<LookFor>~/d(\d+?)\.aspx</LookFor>
<SendTo>~/default.aspx?id=$1</SendTo>
<httpModules>
<add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/>
</httpModules>
------解决方案--------------------
http://blog.csdn.net/jocklyhu/article/details/5982233