最近在配置伪静态可是一直没成功。我是按如下步骤进行的:
1.引用URLRewriter.dll
2.Web.config文件中如下设置:
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/DemoViewState.aspx?id=$</LookFor>
<SendTo>~/DemoViewState.htm?id=$</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>1.htm</LookFor>
<SendTo>D.aspx</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<buildProviders>
<add extension=".htm" type="System.Web.Compilation.PageBuildProvider" />
</buildProviders>
<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler,URLRewriter"/>
<add verb="*" path="*.htm" type="URLRewriter.RewriterFactoryHandler,URLRewriter"/>
</httpHandlers>
进行完配置后请求DemoViewState.aspx URL并没有变成伪静态的URL
弑天下