Router::connect( '/:slug_:sid/*', array('controller' => mycontroller, 'action' => 'index'), array( 'pass'=>array('sid', 'slug'), 'sid'=>'[0-9]+', 'slug'=>'[0-9a-z-]+', ) );
On Aug 6, 2:29 am, JamesF <usaexportexpe...@gmail.com> wrote: > for some reason when i am putting an underscore directly after a named > argument in my route, it breaks. > > doesn't work: > Router::connect('/:slug_:sid/*', array('controller' => mycontroller, > 'action' => 'index'), array('pass'=>array('sid', 'slug'), > 'sid'=>'[0-9]+')); > > if i put a dash or any other character right after my first argument > it works ok but that is not my desired url. > i would like /slug_sid/* > > (my slug is something like my-article-title) > > works: > Router::connect('/:slug-_:sid/*', array('controller' => mycontroller, > 'action' => 'index'), array('pass'=>array('sid', 'slug'), > 'sid'=>'[0-9]+')); > > i saw a bug report about this but nate closed it saying that the regex > wasn't specific enough. i have admittley weak regex skills does anyone > kow a possible solution? > > 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 -~----------~----~----~----~------~----~------~--~---