通过js代码实现https跳转的要页面加载一会儿才跳转,加这个代码页面没等加载直接跳转https,直接上代码!

 "on")
{
    $xredir = "https://".$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
    header("Location: ".$xredir);
}
?>