• 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>





  • 相关阅读:
    leetcode5 Longest Palindromic Substring
    leetcode17 Letter Combinations of a Phone Number
    leetcode13 Roman to Integer
    leetcode14 Longest Common Prefix
    leetcode20 Valid Parentheses
    leetcode392 Is Subsequence
    leetcode121 Best Time to Buy and Sell Stock
    leetcode198 House Robber
    leetcode746 Min Cost Climbing Stairs
    tomcat下使用druid配置jnid数据源
  • 原文地址:https://www.cnblogs.com/haomo/p/2417683.html
Copyright © 2020-2023  润新知