I have problem to set url rules with multiple parameters. I have the action "description" in controller "Article" like this:
public function actionDescription($aID, $aTitle){ ... }
Then i set the url rules like this:
'Article/description/<aID:\d+>/<aTitle:\S+>' => 'article/description',
'<controller:\w+>/<id:\d+>' => '<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
When i call a url through a link like this:
<?= Html::a( Html::encode($model->aTeaser),
['article/description', 'aID' => $model->aID, 'aTitle' => $model->aTeaser],
['class'=>'link_article'])
?>
I still get this url:
http://test.com/article/description?aID=323&aTitle=teaser+of+this+article
instead of this:
http://test.com/article/description/323/teaser+of+this+article
You don't have to specify the escape sequence for the last parameter if you are sure you won't have any parameter after it: