Hi all,
I want to change default routing based on certain criteria. For
example, my apps can be access using www.example.com,
user1.example.com and user2.example.com. I'm using wildcard subdomain
for this.
Everything goes well, I just want to if we can change the default
routing based on user subdomain using AppController->beforeFilter.
// re-route to other url
if ($is_subdomain) {
Router::connect('/', array('controller' => 'pages', 'action' =>
'subpages'));
}
// use default url
else {
Router::connect('/', array('controller' => 'pages', 'action' =>
'display'));
}
I try with the above code seems not working as I wish. Any ideas?
Thank you.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php