zoukankan      html  css  js  c++  java
  • iis6下配置URLRewriter

    web.config下配置  <configuration> 节点下的<configSections>

    <configuration>
    <configSections>
    <section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
    </configSections>
    </configuration>
    <configuration> 
    <RewriterConfig>
    <Rules>
    <RewriterRule>
    <LookFor>~/123.aspx</LookFor>
    <SendTo>~/store.aspx</SendTo>
    </RewriterRule>
    <RewriterRule>
    <LookFor>~/123.html</LookFor>
    <SendTo>~/store.aspx</SendTo>
    </RewriterRule>
    <RewriterRule>
    <LookFor>~/123</LookFor>
    <SendTo>~/store.aspx</SendTo>
    </RewriterRule>
    </Rules>
    </RewriterConfig>
    </configuration>
     <system.web>
    <httpHandlers>
    <add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter"/>
    <add verb="*" path= "*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
    </httpHandlers>
    </system.web>

    接下就是映射ISAPI了

    在你的网站--->属性--->虚拟目录--->配置---->映射--->添加   

    .html  对应  aspnet_isapi.dll     注意去掉检查文件是否存在

    iis 6.0 支持无后缀url

    在你的网站--->属性--->虚拟目录--->配置---->映射--->添加   

    .*  对应  aspnet_isapi.dll     注意去掉检查文件是否存在

    iis 7.0 下支持 URLRewriter

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





  • 相关阅读:
    STL 源代码剖析 算法 stl_numeric.h -- copy
    SQLServer 复制和数据库镜像 具体配置部署
    2016第23周三
    2016第23周二
    2016第23周一
    2016第22周日
    2016第22周六
    2016第22周五
    五个JS经典面试题
    2016第22周三
  • 原文地址:https://www.cnblogs.com/haomo/p/2417683.html
Copyright © 2011-2022 走看看