自己写的宝塔iis环境下的ssl协议强制跳转配置文件

    xiaoxiao2022-06-26  142

    1. 先301强制都跳转到www.xxxx.com

    2.在 判断是否htps,否则跳转到https下面 

    <rule name="301" stopProcessing="true"> <match url="(.*)" ></match> <conditions> <add input="{HTTP_HOST}" pattern="^xxxx.cn" ></add> </conditions> <action type="Redirect" url="https://www.xxxx.cn/{R:1}" redirectType="Permanent" ></action> </rule> <rule name="http-https" stopProcessing="true"> <match url="(.*)" ></match> <conditions> <add input="{HTTPS}" pattern="^OFF$" ></add> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Temporary" ></action> </rule>


    最新回复(0)