[Apache] 아파치 htaccess 이용하여 http 를 https 로 리다이렉트 하기 (redirect http to https using htaccess)
Apache 2021. 5. 4. 09:49
버전이나 환경마다 여러 조건들이 있을 수 있는데 80 포트로 오면 그대로 리다이렉트 하는게 제일 무난한 듯.
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule /(.*)$ https://mydomain.com/$1 [R,L]