Skip to content

Instantly share code, notes, and snippets.

@voycey
Forked from egalles79/routes
Created April 29, 2014 11:30
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 voycey/11397504 to your computer and use it in GitHub Desktop.
Save voycey/11397504 to your computer and use it in GitHub Desktop.
$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