I've got, for example, 2 routes:
/site/test/site/test/foo
I need to write rules for UrlManager so it'll pass first rule to TestController and second to FooController.
Can i actually do that?
You are actually nesting 3 controllers, which i do not think is a really good idea, but you can do it like the following:
'urlManager' => [
'rules' => [
'site/test/foo/<action\w+>' => 'foo/<action>',
'site/test/<action\w+>' => 'test/<action>',
'site/<action\w+>' => 'site/<action>',
...
],
],