Created
April 16, 2011 17:42
-
-
Save rtripault/923332 to your computer and use it in GitHub Desktop.
Initialize contexts based on http hosts (MODX Revolution) - source: http://modxcms.com/forums/index.php/topic,63406.msg359673.html#msg359673
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch(strtolower(MODX_HTTP_HOST)) { | |
case 'dns.tld1:80': | |
case 'dns.tld1': | |
$modx->initialize('ctx1'); | |
break; | |
case 'dns.tld2:443': | |
case 'dns.tld2:80': | |
case 'dns.tld2': | |
$modx->initialize('ctx2'); | |
break; | |
default: | |
$modx->initialize('web'); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment