PHP를 이용한 http를 https로 강제 리다이렉션 방법

index.php 제일 상단에 아래 코드 추가하면 끝!!!! <?php //If the HTTPS is not found to be “on” if(!isset($_SERVER[“HTTPS”]) || $_SERVER[“HTTPS”] != “on”) { //Tell the browser to redirect to the HTTPS URL. header(“Location: https://” . $_SERVER[“HTTP_HOST”] . $_SERVER[“REQUEST_URI”], true, 301); //Prevent the rest of the script from executing. exit; } ?>