문제가 있습니다. IIS
에는 두 개의 포트 80
과 443(https)
이있는 웹 사이트가 있습니다. 사용자의 모든 http
요청을 https
으로 리디렉션하고 싶습니다. 나는 또한 Rewrite rule to https
을 추가했지만, 브라우저에 입력하면 http://localhost/site
그것은 나에게 같은 페이지를 준다. 사용자를 httpS://localhost/site
으로 리디렉션해야합니다.http에서 https 로의 URL 재 작성이 작동하지 않습니다.
내 로컬 구성 때문일 수 있습니다.
IIS
에서 Require SSL
을 사용 중지합니다.
The rule is:
<rewrite>
<rules>
<rule name="HTTPS Redirect">
<match url="(.*)" ignoreCase="false" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="false" />
</conditions>
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}{REQUEST_URI}" />
</rule>
</rules>
</rewrite>
감사합니다.
어디에 규칙이 있습니까? # – ChrisBint
편집 됨. 고맙습니다. –