复制代码 代码如下:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<>
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections>
<>
<RewriterConfig>
<>
<Rules>
<>
<RewriterRule>
<>
<SendTo><![CDATA[~/news.aspx?id=$1&pid=$2]]></SendTo>
<>
<LookFor>~/news/(.[0-9]*)/(.[d]*).html</LookFor>
</RewriterRule>
<RewriterRule>
<>
<SendTo><![CDATA[~/product.aspx?pid=$1]]></SendTo>
<>
<LookFor>~/product/(.[d]*).zangdalei</LookFor>
</RewriterRule>
</Rules>
</RewriterConfig>
<system.web>
<compilation debug="false" targetFramework="4.0">
<>
<buildProviders>
<add extension=".html" type="System.Web.Compilation.PageBuildProvider" />
</buildProviders>
</compilation>
<>
<httpHandlers>
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.zangdalei" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>
</system.web>
<system.webServer>
<handlers>
<add name="aspnethtml" path="*.html" verb="GET,POST" modules="IsapiModule" scriptProcessor="C:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
<add name="aspnetzangdalei" path="*.zangdalei" verb="GET,POST" modules="IsapiModule" scriptProcessor="C:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
</handlers>
<defaultDocument>
<files>
<clear />
<add value="default.aspx" />
<add value="default.html" />
</files>
</defaultDocument>
</system.webServer>
</configuration>