How to make a get request to yii2 if the cnu is configured in the config on the rules the following expressions:

 ''=>'site/index', '<action>'=>'site/<action>', '<controller>/<action>' => '<controller>/<action>', 'site/video/<video:\w+>' => 'site/video', 

in theory, by the request http://сайт.ру/video/sad , the view should open get sad but 404 but if you remove the following expression from rules :

  ''=>'site/index', '<action>'=>'site/<action>', 

then everything works

    1 answer 1

    Try to write such a rule.

     'video/<video:\w+>' => 'site/video', 

    Accordingly, the controller will go get request

     Yii::$app->request->get('video');