Url Problem with star(*)


(MuhammedSami) #1

Hello dear Yii contributors,

im beginner and try to upgrade to yii2

in yii1 i was able to use the url path like below:

<controller:\w+>/<action:\w+>/service/<service:\d+>/*' => '<controller>/<action>
the star(*) that ending the url as you know was meant to end whole params with a slash and not
?id=23?
as sad in yii1 documentation :

If the GET parameters passed to createUrl are more than those required by a rule, the additional parameters will appear in the query string. For example, if we call $this->createUrl(‘post/read’,array(‘id’=>100,‘year’=>2008)), we would obtain /index.php/post/100?year=2008. In order to make these additional parameters appear in the path info part, we should append /* to the rule. Therefore, with the rule post/id:\d+/*, we can obtain the URL as /index.php/post/100/year/2008.

now with yii2 i don’t figure out how to handle this,
thanks for helping.


(MuhammedSami) #2

nobody who can answer my question please ?