Skip to content

Commit

Permalink
added trim to subdomain, now multisite module actually works with mul…
Browse files Browse the repository at this point in the history
…tiple campaign domains
  • Loading branch information
apeisa committed Mar 29, 2012
1 parent 95fdc6b commit 824a2ee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Multisite.module
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,16 @@ class Multisite extends WireData implements Module, ConfigurableModule {
$this->it = ltrim($_GET['it'], '/');

foreach($this->subdomainsArray as $subdomain) {
$subdomain = trim($subdomain);
$config = wire('config');


$httpHost = strtolower(wire('config')->httpHost);
if(strpos($httpHost, $subdomain) !== false) {

$log = new FileLog($config->paths->logs . 'my-log.txt');
$log->save("Init: $subdomain");

$this->subdomain = $subdomain;

// change path like /about/contact/ to /campaign.com/about/contact/
Expand Down

0 comments on commit 824a2ee

Please sign in to comment.