You've got 2 underscores here: '/:slug__:sid/*' If it was up to me, I'd just drop the underscores altogether. Just append sid to slug.
On Thu, Aug 6, 2009 at 11:36 AM, JamesF<[email protected]> wrote: > > i even tried this thinking i was clever > > Router::connect( > '/:slug__:sid/*', > array('controller' => mycontroller, 'action' => 'index'), > array( > 'pass'=>array('sid', 'slug_'), > 'sid'=>'[0-9]+', > 'slug_'=>'[0-9a-z-]+', > ) > ); > > which gave me mysite.com/mycontroller/index/sid:12345/slug_:this-is-my- > slug > > > On Aug 6, 5:13 am, "Dr. Loboto" <[email protected]> wrote: >> 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 <[email protected]> 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 [email protected] 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 -~----------~----~----~----~------~----~------~--~---
