언어/PHP

https 체크 및 리다이렉트

greathuman 2019. 7. 8. 16:09

if(!isset($_SERVER["HTTPS"])) { 
  header("HTTP/1.1 301 Moved Permanently");  
  header("Location: https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);