HTTP 로 접속 시 HTTPS으로 리다이렉트 할수 있다.
if(!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == ""){ $redirect = "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; header("Location: $redirect"); }
HTTP 로 접속 시 HTTPS으로 리다이렉트 할수 있다.
if(!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == ""){ $redirect = "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; header("Location: $redirect"); }