2017-10-10 2 views
0

현재 IIS/Server 2016에서 http_example 및 http_www.example을 https_www.example으로 리디렉션하고 있습니다. 리디렉션은 2 개의 다시 쓰기 규칙과 잘 작동합니다. 그러나 https://examplehttps://www.example으로 리디렉션하는 방법을 파악할 수 없습니다.https 리디렉션 IIS

감사합니다. 감사합니다

+2

[HTTP를 HTTPS로 WWW에 IIS 리디렉션 www가 아닌 ​​(의 가능한 중복 https://stackoverflow.com/questions/32490426/iis-redirect-non-www- to-www-and-http-to-https) –

답변

0

하나의 규칙으로도 달성 할 수 있습니다. 귀하의 경우 규칙에 있어야합니다 :

<rule name="All in one URL" stopProcessing="true"> 
    <match url=".*" /> 
    <conditions logicalGrouping="MatchAny"> 
     <add input="{HTTPS}" pattern="off" /> 
     <add input="{HTTP_HOST}" pattern="^www\." negate="true" /> 
    </conditions> 
    <action type="Redirect" url="https://www.example.com{URL}" /> 
</rule>