asp.net伪静态的配置

我是实用微软提供的两个dll文件实现的伪静态:引用添加过了,配置也配置好了,但是就是没有效果,不知道怎么回事,由于是第一次使用,找不出问题。下面是相关配置:

<configSections>

    <section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />

  <RewriterConfig>
    <Rules>
      <RewriterRule>
        <LookFor>~/index.aspx</LookFor>
        <SendTo>~/default.aspx</SendTo>
      </RewriterRule>
    </Rules>
  </RewriterConfig>

HttpHandlers中的配置:

 <add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
      <add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />

HttpModules中的配置:

      <add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/>


潇湘沐
浏览 285回答 2
2回答

陪伴而非守候

<!--地址重写规则-->&nbsp; <rewriter>&nbsp;&nbsp;&nbsp; <rewrite url="~/(.*)_(\d+).html" to="~/$1.aspx?page=$2" processing="stop"/>&nbsp;&nbsp;&nbsp; <rewrite url="~/(.*).html" to="~/$1.aspx" processing="stop"/>&nbsp; </rewriter>
打开App,查看更多内容
随时随地看视频慕课网APP