fix of the vhost problem
[squirrelmail.git] / functions / strings.php
index 23f1b1814ccaf9d36e1574fd2f279da7c8db9aa9..d39df3e59660f1c4bbb174b4ee97a630a3cd2493 100644 (file)
@@ -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, ':')) {