iis url rewrite http->https non-www->www

<system.webServer>
  <rewrite>
    <rules>       <rule name="Redirect abc.com to www" patternSyntax="ECMAScript" stopProcessing="true">         <match url=".*" />         <conditions>           <add input="{HTTP_HOST}" pattern="^abc.com$" />         </conditions>         <action type="Redirect" url="https://www.abc.com/{R:0}" redirectType="Permanent" />       </rule>       <rule name="Redirect to abc.com https" enabled="true" patternSyntax="Wildcard" stopProcessing="true">         <match url="*" negate="false" />
        <conditions logicalGrouping="MatchAny">           <add input="{HTTPS}" pattern="off" />         </conditions>         <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />       </rule>
    </rules>   </rewrite> </system.webServer>

 

posted @ 2019-01-13 14:38  wintersoft  阅读(372)  评论(0编辑  收藏  举报