zoukankan      html  css  js  c++  java
  • IIS8.5中的强制https直接修改web.config文件和顶级域名跳转www和过滤子目录不强制跳转

    亲测可用

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>

    <rule name="301Redirect" stopProcessing="true">

    <match url="(.*)" />

    <conditions logicalGrouping="MatchAny">

    <add input="{HTTP_HOST}" pattern="^seo-6.com$" />

    </conditions>

    <action type="Redirect" url="http://www.seo-6.com/{R:0}" redirectType="Permanent" />

    </rule>

                    <rule name="http redirect to https" stopProcessing="true">
                        <match url="(.*)" />
                        <conditions>
                            <add input="{HTTPS}" pattern="^OFF$" />
                            <add input="{HTTPS_HOST}" pattern="^(localhost)" negate="true" />
                        </conditions>
                        <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />
                    </rule>
    //这个是xiaomingmm目录不强制HTTPS

    <rule name="HttpToHttps" stopProcessing="true">
    <match url="^((?!xiaoxingmm).)*$" />
    <conditions>
    <add input="{HTTPS}" pattern="off" ignoreCase="true" />
    </conditions>
    <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:0}" />
    </rule>//到这结束

                </rules>
            </rewrite>
        </system.webServer>
    </configuration>
  • 相关阅读:
    构建乘积数组
    数组中重复的数字
    把字符串转换成整数
    不用加减乘除做加法
    求1+2+3+...+n
    孩子们的游戏(圆圈中最后剩下的数)
    翻转单词顺序列
    扑克牌顺子
    左旋转字符串
    ES6必知必会 —— Module
  • 原文地址:https://www.cnblogs.com/baker95935/p/11298925.html
Copyright © 2011-2022 走看看