ssl 설정 후,
http://도메인 으로 접속하려 해도
https://도메인 으로만 접속되도록 하려고합니다.
000-default.conf 파일내에
redirect 말고 다른 방법이 있을까요??
|
답변 5개 / 댓글 4개
.htaccess 파일 상단에 아래 코드 추가해주시면 됩니다.
Copy
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
답변을 작성하려면 로그인이 필요합니다.