더 나은 프로그래머가 되자

http 접속시 https 301 리다이렉트 .htaccess 세팅 본문

리눅스

http 접속시 https 301 리다이렉트 .htaccess 세팅

greathuman 2019. 10. 31. 13:14
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}:501%{REQUEST_URI} [L,R=301]
</IfModule>

 

:501은 포트번호이고 기본 443포트일경우 제거

Comments