PHP Redirect http to https

if ($_SERVER[‘HTTPS’] != “on”) {
$url = “https://”. $_SERVER[‘SERVER_NAME’] . $_SERVER[‘REQUEST_URI’];??? ?header(“Location: $url”);
exit;
}

Leave a Reply