I need help with urlManager. I have the next routes:
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'http://<siteURL:[\w-]+>.'.$siteDomain.'/<module:\w+>/<controller:\w+>/<action:\w+>/*'=> array('<module>/<controller>/<action>'),
'http://<siteURL:[\w-]+>.'.$siteDomain.'/<controller:\w+>/<action:\w+>/*'=> array('<controller>/<action>'),
),
),
When I’m trying to create url this way: $this->createUrl(‘category/view’, array(‘id’=>$data->id))
I’m getting h ttp://mysubdomain.mydomain/category/view/id/4 and that is correct.
But in the controller I’m receiving the next $_REQUEST
(
[PHPSESSID] => 68af343f09e017b6c054cb027a2107d0
[YII_CSRF_TOKEN] => ab58bffa5ae554de33e470ea12ca228def3aa16c
[siteURL] => mysubdomain
[4] =>
[id] =>
)
What should be changed in the route rules to get
(
[PHPSESSID] => 68af343f09e017b6c054cb027a2107d0
[YII_CSRF_TOKEN] => ab58bffa5ae554de33e470ea12ca228def3aa16c
[siteURL] => mysubdomain
[id] => 4)
Sure it should be not hard coded, so i could add params with different names (not just id) and they should be parsed as usual.