develop/web
.htaccess를 활용한 https 이동
인드라17
2023. 8. 30. 17:03
- 웹 ROOT 폴더에 저장
- 서브도메인은 제외하고 싶은경우 주석해제
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} off
# RewriteCond %{HTTP_HOST} !^(sub1\.mydomain\.com|sub2\.mydomain\.com)
RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
</IfModule>