i have the following script on my checkout page to check if https is set in
the address bar:
if ($_SERVER['HTTPS'] != "on")
{
$url = $_SERVER['SERVER_NAME'];
$query = $_SERVER['QUERY_STRING'];
$path = $_SERVER['PHP_SELF'];
header("Locatio n: https://$url$path?$quer y");
}
my problem is that i need to escape from https when another page is
selected. I tried changing the code on other pages (an include file) to
read:
if ($_SERVER['HTTPS'] != "off")
{
$url = $_SERVER['SERVER_NAME'];
$query = $_SERVER['QUERY_STRING'];
$path = $_SERVER['PHP_SELF'];
header("Locatio n: http://$url$path?$quer y");
}
but to no avail. Is this right?
Craig
the address bar:
if ($_SERVER['HTTPS'] != "on")
{
$url = $_SERVER['SERVER_NAME'];
$query = $_SERVER['QUERY_STRING'];
$path = $_SERVER['PHP_SELF'];
header("Locatio n: https://$url$path?$quer y");
}
my problem is that i need to escape from https when another page is
selected. I tried changing the code on other pages (an include file) to
read:
if ($_SERVER['HTTPS'] != "off")
{
$url = $_SERVER['SERVER_NAME'];
$query = $_SERVER['QUERY_STRING'];
$path = $_SERVER['PHP_SELF'];
header("Locatio n: http://$url$path?$quer y");
}
but to no avail. Is this right?
Craig
Comment