CakePHP routing configuration for multi-tenant application
$validTenant = '[a-z0-9-]+';
Router::connect('/a/:tenant', array('controller' => 'home'), array('tenant' => $validTenant));
Router::connect('/a/:tenant/:controller', array(), array('tenant' => $validTenant));
Router::connect('/a/:tenant/:controller/:action/*', array(), array('tenant' => $validTenant));
Written by William Notowidagdo
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Cakephp
Authors
Related Tags
#cakephp
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#