zoukankan      html  css  js  c++  java
  • IIS 7 站点设置支持url_rewrite

    站点从2003 的IIS6 迁移到 2008的IIS7发现web.config里面配置的URL_Rewrite不生效,也查了好久,先贴下配置文件

    <configSections>
            <!-- 地址重写配置 -->
            <section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
            <!--日志记录-->
            <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
        </configSections>
        <RewriterConfig>
            <Rules>
                <!--重写规则 -->
                <!--<RewriterRule>
                    <LookFor>~/(.[0-9]*)</LookFor>
                    <SendTo>~/v2/play.html?roomid=$1</SendTo>
                </RewriterRule>-->      
                <RewriterRule>
            <LookFor>~/(d+)</LookFor>
            <SendTo>~/v5/player.aspx?roomid=$1</SendTo>
          </RewriterRule>
                <RewriterRule>
                    <LookFor>~/jy/(w+)</LookFor>
                    <SendTo>~/jy/play.aspx?roomid=$1</SendTo>
                </RewriterRule>
          <RewriterRule>
            <LookFor>~/user/(.[0-9]*)</LookFor>
            <SendTo>~/v4/userspace.aspx?uidx=$1</SendTo>
          </RewriterRule>
          <!--<RewriterRule>
            <LookFor>~/room/(.[0-9]*)-(.[0-9]*).html</LookFor>
            <SendTo>~/v2/roomlist_v.aspx?sid=$1&amp;serverid=$2</SendTo>
          </RewriterRule>-->
          <!--<RewriterRule>
            <LookFor>~/room/(.[0-9]*)-(.[0-9]*).html</LookFor>
            <SendTo>~/v2/roomlist_v.aspx?sid=$1&amp;serverid=$2</SendTo>
          </RewriterRule>-->
          <RewriterRule>
            <LookFor>~/room/list-(.[0-9]*)-(.[0-9]*).html</LookFor>
            <SendTo>~/v5/roomList.aspx?dq_id=$1&amp;id=$2</SendTo>
           </RewriterRule>
          <RewriterRule>
            <LookFor>~/m(d+)</LookFor>
            <SendTo>~/v6/player.aspx?useridx=$1</SendTo>
          </RewriterRule>
           </Rules>
        </RewriterConfig>

    只需要进行简单的配置就可以生效

     

    记录一下,以防下次再忘记了

  • 相关阅读:
    include与php://input执行任意命令
    php Session反序列化漏洞
    php代码审计-file_get_contents()&file_put_contents()
    php代码审计-用户名和密码分开检验
    php -- get_magic_quotes_gpc()函数
    md5(“ffifdyop“,true)
    php弱类型相关
    BurpWeb安全学院之XXE
    ICMP隐藏通信隧道技术
    BurpWeb安全学院之敏感信息泄露
  • 原文地址:https://www.cnblogs.com/LouisZJ/p/8580023.html
Copyright © 2011-2022 走看看