Is it possible to match an unlimited number of slashes with a rule? Like if I request:
/something/category/sub/subsub
And have this URL rule:
'something/<slug>' => 'category/show',
And controller code:
public function actionShow( $slug ) {
echo $slug; // would return category/sub/subsub
}
Thanks in advance
redguy
(Maciej Lizewski)
3
how about:
‘something/<slug:(.*)>$’ => ‘category/show’,
1 Like
boaz
(Boaz Rymland)
4
I just stumbled upon this thread searching for how to catch anything in a URL besides forward slash.
In short, this should catch anything, including slashes. Beware…:
'myModule/<slug:.+>' => 'myModule/someModel/view',
ankogit
(Anatoliy Antoneko)
5
You very help me! Pattern slug:(.*) works for me