新HTTPS跳转方式
新https跳转方法,更快,无需设置伪静态,只需把代码加入header.php就可以,代码如下
<?php
if ($_SERVER[“HTTPS”] <> “on”)
{
$xredir = “https://“.$SERVER[“SERVER
NAME”].$_SERVER[“REQUEST_URI”];
header(“Location: “.$xredir);
}
?>
新https跳转方法,更快,无需设置伪静态,只需把代码加入header.php就可以,代码如下
<?php
if ($_SERVER[“HTTPS”] <> “on”)
{
$xredir = “https://“.$SERVER[“SERVER
NAME”].$_SERVER[“REQUEST_URI”];
header(“Location: “.$xredir);
}
?>