.htaccess 사용하여 http => https 리다이렉트 처리
2021. 8. 24. 10:44ㆍ기타
안녕하세요
이번에 가비아의 웹호스팅 사용중 ssl 설치후에도 http 주소로 들어갈 경우 https로 자동전환이 되지 않아서
찾아본결과 루트 경로에 .htaccess 파일을 추가하여 처리가 가능하여 포스팅 하게 되었습니다.
<ifmodule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</ifmodule>
위와같이 입력후 루트경로에 해당 파일을 올리게 되면 http로 접속이 되더라고 자동으로 https 로 전환되어질 것입니다.
'기타' 카테고리의 다른 글
[전자공시] DART OPEN API (0) | 2021.05.03 |
---|---|
[기타] Gmail 발송시 (Username and Password not accepted. Learn more at ...) Error 발생 (1) | 2020.11.09 |
[Multiple annotations found at this line] 이클립스 에러 (0) | 2020.08.19 |
주식정보 가져오기 (한국거래소 이용) (2) | 2020.04.07 |