Skip to content

Instantly share code, notes, and snippets.

@Demoli
Forked from valguss/dev_test.php
Created March 16, 2012 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Demoli/2049570 to your computer and use it in GitHub Desktop.
Save Demoli/2049570 to your computer and use it in GitHub Desktop.
Thoughts on best way to test subdomain
<?php
//faster using strpos
$staging_subdomains = array(
's1',
's2',
's3',
's4',
's5',
'mac',
'local',
'mac-upgrade',
);
foreach($staging_subdomains as $needle){
if(strpos($_SERVER['HTTP_HOST'], $needle) !== false){
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment