if(!isset($_SERVER['HTTPS'])||$_SERVER['HTTPS']=='off'){
header("HTTP/1.1 301 Moved Permanently");
header('Location:https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
}
if(!isset($_SERVER['HTTPS'])||$_SERVER['HTTPS']=='off'){
header("HTTP/1.1 301 Moved Permanently");
header('Location:https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
}
本文标题:php http强制跳转https
本文链接:https://www.haomeiwen.com/subject/kltractx.html
网友评论