Forum Moderators: coopster
$_SERVER['HTTPS']='on';
function IsLinkSecure()
{
return isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == "on");
}
if( IsLinkSecure() )
{
header("location: [mysite.com...]
}
This does the redirection :
header("location: [mysite.com...]
but when I use:
header("location: [mysite.com...]
the redirection fails :((((
I implemented this in the ssl.php file:
function secure_page()
{
if (!isset($_SERVER['HTTPS']) ¦¦ strtolower($_SERVER['HTTPS'])!= 'on' )
{
header ('Location: ['.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);...]
exit();
}
}
function insecure_page()
{
header ('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
exit();
}
the secure_page function is working fine, but when I call the insecure_page funtion to go back to http the redirection fails :(((
Anyone?
[edited by: encyclo at 2:32 pm (utc) on Nov. 12, 2005]
[edit reason] delinked url [/edit]