Url重新定向
<configuration>
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
</configSections>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/Product/([\w\.-]+)/([\w\.-]+)/([\w\.-]+).aspx</LookFor>
<SendTo><![CDATA[~/Product/default.aspx?ProductType=$1&ProductID=$2]]></SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/test/([\w\.-]+)/([\w\.-]+)/([\w\.-]+).aspx</LookFor>
<SendTo><![CDATA[~/test/Url.aspx?ProductType=$1&ProductID=$2]]></SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
</configuration>
<system.web>
<httpModules>
<add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/>
</httpModules>
</system.web>
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
</configSections>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/Product/([\w\.-]+)/([\w\.-]+)/([\w\.-]+).aspx</LookFor>
<SendTo><![CDATA[~/Product/default.aspx?ProductType=$1&ProductID=$2]]></SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/test/([\w\.-]+)/([\w\.-]+)/([\w\.-]+).aspx</LookFor>
<SendTo><![CDATA[~/test/Url.aspx?ProductType=$1&ProductID=$2]]></SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
</configuration>
<system.web>
<httpModules>
<add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/>
</httpModules>
</system.web>
这样配置就可以了!

浙公网安备 33010602011771号