UrlManager -- infinite parameters

Tht

Hi, does anyone if this is possible:

We have a simple pattern for a user’s pics url:


'<username>/pics' => 'user/show'

This matches urls like /shiki/pics but won’t match urls with additional parameters like /shiki/pics/page/1/filter/people. How do you create a pattern for that? I’d also like to note that the extra parameters are a little dynamic (i.e. there might be instances where /page/1 is not included).

Here are sample urls that I’d like to point to the same controller/action:

  • /shiki/pics/filter/people

  • /shiki/pics/page/3

  • /shiki/pics/page/1/filter/things

  • /shiki/pics/page/4/sort/latest

Is this possible? This is easily accomplished with the old style: /shiki/pics?page=1&filter=people. But if it’s possible to have the nice-looking urls above then we’d definitely like that :)

Try with this:


'<username>/pics/*' => 'user/show'

This will also match any number of parameters…

Thanks! That worked!