본문 바로가기

.htaccess https 리다이렉팅

MintState 2018년 7월 30일 오후 4:04 조회 7593

.htaccess https 리다이렉팅

아파치에서 http로 시작하는 URL을 https로 Redirect 방법

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{THE_REQUEST} !test.html [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

예외 URL은 RewriteCond %{THE_REQUEST} !test.html [NC] 처럼 추가하면 됩니다.

공유 X Facebook LINE QR 코드

댓글 0개

첫 댓글을 남겨보세요.