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>