Skip to content

Commit

Permalink
Merge pull request #62 from ianthe/LIB001-865
Browse files Browse the repository at this point in the history
LIB001-865: Handling www. in hostnames to find config files
  • Loading branch information
ianthe committed Aug 14, 2014
2 parents 43675e0 + 544af28 commit 7c1e434
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions application/controllers/skylight.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ function _load_site_config() {
// remove test.
$hostname = substr($hostname, 5);
}
// strip out the www if it's there
else if(strpos($_SERVER['HTTP_HOST'], "www.") !== false) {
// will be www.hostname
// remove www.
$hostname = substr($hostname, 4);
}
// else just use the hostname

}
Expand Down

0 comments on commit 7c1e434

Please sign in to comment.