I found making this the last condition seems to do the trick, but I'm not sure if this is the proper way to do it:
Router::connect('/[0-9]{1,4}', array('controller' => 'places','action' => 'view', $_GET['url'] )); Zoltan On Mar 24, 12:49 pm, "Chowsapal" <[EMAIL PROTECTED]> wrote: > I'm not sure I know the best answer for this, but one thing you could > do is: > > Router::connect('/:param_name', array('controller' => 'places', > 'action' => 'view')); > > This will set $this->params['param_name'] to 123 or whatever is > there. As far as limiting this to only numbers, or using info from > the first parameter in the second one, I'm not really sure. hth. > > On Mar 24, 10:34 am, "Zoltan" <[EMAIL PROTECTED]> wrote: > > > I'm sure this has been asked before, but I haven't be able to turn up > > the answer: > > > I want to have a url like mysite/123 resolve to mysite/places/view/506 > > > Using 1.2, I have a route like: > > Router::connect('/[0-9]+', array('controller' => 'places', 'action' => > > 'view', $this->params['url'] <-- **doesn't work *** )); // places/ > > view/506 > > > how do I specify this? > > > thanks, > > Zoltan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---