summaryrefslogtreecommitdiff
path: root/logout.php
diff options
context:
space:
mode:
Diffstat (limited to 'logout.php')
-rw-r--r--logout.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/logout.php b/logout.php
index 9af2bab61..b258067a6 100644
--- a/logout.php
+++ b/logout.php
@@ -7,7 +7,17 @@
logout_user();
if (!USE_HTTP_AUTH) {
- header("Location: login.php");
+ $url_path = get_script_urlpath();
+
+ if (ENABLE_LOGIN_SSL) {
+ $protocol = "https";
+ } else {
+ $protocol = "http";
+ }
+
+ $redirect_base = "$protocol://" . $_SERVER["SERVER_NAME"] . $url_path;
+
+ header("Location: $redirect_base/login.php");
} else { ?>
<html>