diff options
Diffstat (limited to 'include/functions_url.inc.php')
-rw-r--r-- | include/functions_url.inc.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/functions_url.inc.php b/include/functions_url.inc.php index 00511e151..44b592036 100644 --- a/include/functions_url.inc.php +++ b/include/functions_url.inc.php @@ -60,7 +60,15 @@ function get_absolute_root_url($with_scheme=true) $url = ''; if ($with_scheme) { - $url .= 'http://'.$_SERVER['HTTP_HOST']; + if (empty($_SERVER['HTTPS'])) + { + $url .= 'http://'; + } + else + { + $url .= 'https://'; + } + $url .= $_SERVER['HTTP_HOST']; if ($_SERVER['SERVER_PORT'] != 80) { $url_port = ':'.$_SERVER['SERVER_PORT']; |