zoukankan      html  css  js  c++  java
  • URL Rewrite 配置下载

    我们也可以手动下载URL Rewrite插件,这是官方地址:URL Rewrite下载

    安装完成后,webconfig添加如下配置。

    <rewrite>
    <rules>
    <rule name="HostNameRule1">
    <match url="(.*)" />
    <!--匹配所有条件-->
    <conditions logicalGrouping="MatchAny">
    <!--当不是使用https协议访问的时候-->
    <add input="{HTTPS}" pattern="^OFF$" />
    <!--并且访问的host不是potekelec.com这种,例如www.potekelec.com-->
    <add input="{HTTP_HOST}" pattern="^www.********.com$" negate="true" />
    </conditions>
    <!--跳转到https-->
    <action type="Redirect" url="https://www.********.com/{R:1}" redirectType="Permanent" />
    </rule>
    <rule name="HTTPS redirect">
    <match url="(.*)" />
    <conditions>
    <!--当使用HTTPS协议访问-->
    <add input="{HTTPS}" pattern="^ON$" />
    <!--当访问 https://potekelec.com的时候-->
    <add input="{HTTP_HOST}" pattern="^www.********.com$" negate="true" />
    </conditions>
    <!--跳转到HTTPS-->
    <action type="Redirect" url="https://www.********.com/{R:1}" redirectType="Permanent" />
    </rule>
    </rules>
    </rewrite>

  • 相关阅读:
    基本样式
    表单基础知识
    边框内圆角
    灵活的背景定位
    多重边框
    半透明边框
    变量关系
    闭包2——闭包与变量
    闭包
    基本包装类型
  • 原文地址:https://www.cnblogs.com/tianlong/p/12175817.html
Copyright © 2011-2022 走看看