zoukankan      html  css  js  c++  java
  • IIS7.0中伪静态配置说明

    web.conf配置文件的格式

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    <system.webServer>
    <rewrite>
    <rules>
    <rule name="Imported Rule 1">
    <match url="ShowProduct/([0-9]*).html"/>
    <action type="Rewrite" url="/view.asp?id={R:1}" />
    </rule>
    <rule name="Imported Rule 2">
    <match url="about_([0-9]*).html"/>
    <action type="Rewrite" url="/about.asp?id={R:1}" />
    </rule>
    </rules>
    </rewrite>
    </system.webServer>
    </configuration>

    配置web.config文件由其它规则导入时要调整的地方:

    1、match语句最前面不需要加“/”如:
    <match url="/ShowProduct/([0-9]*).html"/>
    修改为:
    <match url="ShowProduct/([0-9]*).html"/>(注:去掉了最前面“/”)

    2、action语句内不要使用转义符号。如:
    <action type="Rewrite" url="/view\.asp\?id={R:1}" />
    修改为:
    <action type="Rewrite" url="/view.asp?id={R:1}" />(注:去掉了“.”与“?”的转义符号,“&”符号写成“&amp;”)

  • 相关阅读:
    java 使用相对路径读取文件
    appium 使用过程问题踩坑-笔记
    CentOS下启动Tomcat
    jodis遇到的问题
    CentOS 7.0 防火墙
    sentinel
    keepalived
    在Tomat7上使用Redis保存Session
    Log4j 使用
    java路径问题
  • 原文地址:https://www.cnblogs.com/top5/p/3109863.html
Copyright © 2011-2022 走看看