Browse Source

fix of the vhost problem

teepe 23 years ago
parent
commit
40dc91f563
1 changed files with 4 additions and 0 deletions
  1. 4 0
      functions/strings.php

+ 4 - 0
functions/strings.php

@@ -300,7 +300,11 @@ function get_location () {
         $host = $HTTP_HOST;
     } else if (isset($SERVER_NAME) && !empty($SERVER_NAME)) {
         $host = $SERVER_NAME;
+    } else if (isset($HTTP_SERVER_VARS['SERVER_NAME']) &&
+               !empty($HTTP_SERVER_VARS['SERVER_NAME'])) {
+        $host = $HTTP_SERVER_VARS['SERVER_NAME'];
     }
+
     
     $port = '';
     if (! strstr($host, ':')) {