Skip to content

Instantly share code, notes, and snippets.

@valguss
Forked from davidalexander/index.php
Created March 16, 2012 10:29
Show Gist options
  • Save valguss/2049474 to your computer and use it in GitHub Desktop.
Save valguss/2049474 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;
}
}
@Demoli
Copy link

Demoli commented Mar 16, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment