I haven't used routes allot, so struggling a bit with it.

What I want to do is:

=> /* to the RedirectController, action index
=> /Api/*  to the ApiController, action index

So by default, redirect everything to the RedirectController
for example: http://domain.com/param to the index method in
RedirectController

if it's for the ApiController, redirect it to there
for example: http://domain.com/Api/ to the index method in
ApiController

This is what I have in my routes.php:

Router::connect('/Api/*', array('controller' => 'Api', 'action' =>
'index'));
Router::connect('/*', array('controller' => 'redirect', 'action' =>
'index'));

Any idea on how I can do this?


Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to