i have been trying to force my page to a HTTPS address, but it does not work, but when i echo the $url it gives the desired address with https
code
<?php
if (!isset($_SERVER['HTTPS']) || !$_SERVER['HTTPS']) {
$url = 'https://' . $_SERVER['HTTP_HOST']
. $_SERVER['REQUEST_URI'];
header('Location: ' . $url);
}
?>
still the page loads with http protocol, can anybody help me to get it to a https page