Hi everyone,
obviously I did not understand the url rewrite management. The thing I want to do is the following. I got this link:
'url'=>array($this->createUrl('/user/offers/',array('id'=>Yii::app()->user->id)))
I’d like to have this url: <domain>/user/<ID>/offers
Furthermore I’d like to have that this url points to my controller CategoryOfferController.php with the action ‘ViewOffersByUser’.
Can someone tell me how to accomplish this? I tried it hopelessly with url rewrite (‘offers/user/id/<id:\d+>’=>‘CategoryOffer/ViewOffersByUser’,) in the main.php file, without any luck
Thanks in advance!!
my main.php urlManager section:
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'caseSensitive'=>false,
'rules'=>array(
// offers
'offers/user/id/<id:\d+>'=>'CategoryOffer/ViewOffersByUser',
// GII
'gii' => 'gii',
'gii/<controller:\w+>' => 'gii/<controller>',
'gii/<controller:\w+>/<action:\w+>' => 'gii/<controller>/<action>',
),
),