본문 바로가기

WEB-SERVER/OHS & JBCS & Apache

[JBCS-Apache] http to https 리다이렉트

728x90

httpd.conf내에 아래와 같이 작성

# Enabling rewrite
RewriteEngine on

# Any request to root will be redirected to HTTPS
RewriteRule ^/$ https://%{HTTP_HOST}/ [R,L]

# Any request to any context will be redirected to HTTPS (with the content)
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R,L]