Solved but not very satisfied. I allow a couple of actions in the normal routing and the rest in the my prefix routing: // account stuff (login, register, reset_password, etc) Router::connect('/:lang/accounts/:action/*', array('controller' => 'accounts'), array('lang'=>'[a-zA-Z]{2}','action'=>'(register|login| logout|reset_password|confirm)'));
// when loggedin Router::connect('/:lang/my/:controller/:action/*', array('prefix'=>'my'), array('lang'=>'[a-zA-Z]{2}')); But whenever an action is changed or added I have to add this in my routes.php. Thanks anyway Tarique! - primeminister On 16 jul, 12:22, Primeminister <[EMAIL PROTECTED]> wrote: > That worked! > The route changed also to: > Router::connect('/:lang/my/:controller/:action/*', > array('prefix'=>'my'), array('lang'=>'[a-zA-Z]{2}')); > > But now it collides with the normal account routes: > Router::connect('/:lang/accounts/:action/*', array('controller' => > 'accounts'), array('lang'=>'[a-zA-Z]{2}')); > > Which I use for register, login, etc actions > The HTML link is here: > $html->link('Register', > array('controller'=>'accounts','action'=>'register','admin'=>false), > array('class'=>'signin')); > and gives me the url:http://www.pages.local/nl/my/accounts/register > And it must be without the 'my' > > On 16 jul, 12:14, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote: > > > On Wed, Jul 16, 2008 at 3:28 PM, Primeminister <[EMAIL PROTECTED]> wrote: > > > > Tried that to but gives me: > > >http://www.pages.local/accounts/edit/77123 > > > So still no prefix 'my' like in > > >http://www.pages.local/my/accounts/edit/77123 > > > Try moving the Router::connect('/my/:controller/:action', > > array('prefix'=>'my')); to be the first route and in the link you need not > > give prefix=> just give controller, action and params > > > Tarique --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---