Windows Server
iis 7.x http -> https 강제 리디랙션
ravon
2018. 7. 9. 17:54
ROOT 디렉토리에 web.config 파일을 생성 후 다음내용을 넣고 저장한다.
→ IIS Rewirte 모듈이 필요 http://www.iis.net/downloads/microsoft/url-rewrite
2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <configuration> <system.webServer> <rewrite> <rules> <rule name="HTTP to HTTPS redirect" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> </conditions> <action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" /> </rule> </rules> </rewrite> </system.webServer> </configuration> |