summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2013-01-25 14:28:24 -0500
committerBharat Mediratta <bharat@menalto.com>2013-01-25 14:28:24 -0500
commitcc91159beed09cdde8322801a1b2a501b639b036 (patch)
tree28eee007b51e6242b76246908d13300ec5ef453c
parentba3b0c06b0874faeed0eaa62e507c8d44f2a68f5 (diff)
Follow-on to 8e954cf5f0be61eb9ac6fa6e8f04ee6dcf4aaf23 - use HTTP_HOST if there's no SERVER_NAME
-rw-r--r--system/helpers/url.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/helpers/url.php b/system/helpers/url.php
index 2641cf06..014f96fe 100644
--- a/system/helpers/url.php
+++ b/system/helpers/url.php
@@ -62,7 +62,7 @@ class url_Core {
if ($site_domain === '' OR $site_domain[0] === '/')
{
// Guess the server name if the domain starts with slash
- $base_url = $protocol.'://'.$_SERVER['SERVER_NAME'].$site_domain;
+ $base_url = $protocol.'://'.($_SERVER['SERVER_NAME']?$_SERVER['SERVER_NAME']:$_SERVER['HTTP_HOST']).$site_domain;
}
else
{