본문 바로가기
개발/php

php http or https 체크하여 https로 강제 링크

by 향유 2021. 1. 19.
if($_SERVER['HTTPS'] != "on"){

  header("Location: https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);

}

댓글