Skip to content

Instantly share code, notes, and snippets.

@egalles79
Created April 29, 2014 11:26
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save egalles79/11397433 to your computer and use it in GitHub Desktop.
Problems with subdomains and routes
$subdomain = substr( env("HTTP_HOST"), 0, strpos(env("HTTP_HOST"), ".") );
Configure::write('captacion', '');
if( strlen($subdomain)>0 && $subdomain != "m" ) {
Router::connect('*',array('controller'=>'private','action'=>'promote'));
// Router::connect('/foo', array('controller'=>'mobiles','action'=>'foo'));
Configure::write('captacion', $subdomain);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment