diff options
author | Andrew Dolgov <[email protected]> | 2005-12-09 21:34:29 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2005-12-09 21:34:29 +0100 |
commit | 75836f33860f26ca55ec8e8661cff4b0edc2fe5e (patch) | |
tree | 55856842d3fef1121e4765a78cab7f47f24b56b8 /logout.php | |
parent | a24f525cce32a6515532ac9392a5b02838ff82be (diff) |
option to redirect to https url for login, option ENABLE_LOGIN_SSL (fixes some non-absolute redirects)
Diffstat (limited to 'logout.php')
-rw-r--r-- | logout.php | 12 |
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> |