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>





  • 相关阅读:
    Sort
    MyOD
    Linux C语言编程基础(必做)
    团队作业(一):团队展示
    2.3.1测试
    《Unix/Linux系统编程》第四章学习笔记
    课堂测试2
    课堂测试
    第三章 Unix/Linux进程管理学习笔记
    团队作业(二):需求分析
  • 原文地址:https://www.cnblogs.com/haomo/p/2417683.html
Copyright © 2011-2022 走看看