'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'news/<id:\d+>/<url:\d+>'=>'news/view',
]
]
<?= Html::a('Название', ['view', 'id' => '3', 'url' => 'statya']) ?>
/news/view?id=8&url=statya
/news/3/statya
/news/3
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'news/<id:\d+>/<url:\w+>'=>'news/view',
]
]