Browse Source

Fix for IIS, thanks Bruce Richardson

Thijs Kinkhorst 22 years ago
parent
commit
6deb18e8dc
1 changed files with 3 additions and 2 deletions
  1. 3 2
      functions/strings.php

+ 3 - 2
functions/strings.php

@@ -194,12 +194,13 @@ function get_location () {
     
     
     /*
     /*
      * If you have 'SSLOptions +StdEnvVars' in your apache config
      * If you have 'SSLOptions +StdEnvVars' in your apache config
-     *     OR if you have HTTPS in your HTTP_SERVER_VARS
+     *     OR if you have HTTPS=on in your HTTP_SERVER_VARS
      *     OR if you are on port 443
      *     OR if you are on port 443
      */
      */
     $getEnvVar = getenv('HTTPS');
     $getEnvVar = getenv('HTTPS');
     if ((isset($getEnvVar) && !strcasecmp($getEnvVar, 'on')) ||
     if ((isset($getEnvVar) && !strcasecmp($getEnvVar, 'on')) ||
-        (isset($_SERVER['HTTPS'])) ||
+        (isset($_SERVER['HTTPS']) &&
+         !strcasecmp($_SERVER['HTTPS'], 'on')) ||
         (isset($_SERVER['SERVER_PORT']) &&
         (isset($_SERVER['SERVER_PORT']) &&
          $_SERVER['SERVER_PORT'] == 443)) {
          $_SERVER['SERVER_PORT'] == 443)) {
         $proto = 'https://';
         $proto = 'https://';