summaryrefslogtreecommitdiff
path: root/logout.php
diff options
context:
space:
mode:
Diffstat (limited to 'logout.php')
-rwxr-xr-xlogout.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/logout.php b/logout.php
index 7a9f6c2..a786403 100755
--- a/logout.php
+++ b/logout.php
@@ -24,7 +24,7 @@ if (isset($_COOKIE[session_name('trackme')])) {
setcookie(session_name('trackme'),'',time()-42000,'/');
}
session_destroy();
-@$ssl = ($_SERVER['HTTPS'] == "" ? "http" : "https");
+$ssl = ((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "" || $_SERVER['HTTPS'] == "off") ? "http" : "https");
$url = str_replace("//", "/", $_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])."/index.php");
header("Location: $ssl://$url");
?>