Skip to content

.htaccess https 리다이렉팅

MintState July 30, 2018 at 4:04 PM Views 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] 처럼 추가하면 됩니다.

Share X Facebook LINE QR code

0 comments

Be the first to comment.