Skip to content

Commit

Permalink
Revised the base_url auto-generation detection of protocol as some se…
Browse files Browse the repository at this point in the history
…rvers will not send off.
  • Loading branch information
Phil Sturgeon committed Dec 15, 2010
1 parent 17a1bc5 commit 50b2705
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/core/Config.php
Expand Up @@ -54,7 +54,7 @@ function __construct()
// Base URL (keeps this crazy sh*t out of the config.php
if(isset($_SERVER['HTTP_HOST']))
{
$base_url = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ? 'https' : 'http';
$base_url = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http';
$base_url .= '://'. $_SERVER['HTTP_HOST'];
$base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
}
Expand Down

0 comments on commit 50b2705

Please sign in to comment.