$prot = $_SERVER["HTTPS"]; //on
if($prot != "on"){ // HTTPS가 아니면 동작 $host = $_SERVER['HTTP_HOST']; $request_uri = $_SERVER['REQUEST_URI']; $m_url = "https://" . $host . $request_uri;
header( "HTTP/1.1 301 Moved Permanently" ); header( "Location: $m_url" ); exit; }
|