If you expect the following url.
local / application / web / A / B / C / D
To go to the following:
AController-> actionB ($ c, $ d)
you can specify main.php, as in the following example.
You must set the URL rule, as I mentioned in the example below. It should work.
'urlManager' => [ 'class' => 'yii\web\UrlManager', 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [ '<controller:\w+>/<action:\w+>/<id:\d+>/<id:\d+>' => 'a/b/c/d' ], ],
Please let me know if you have any questions.
user3176739
source share