URL Rewrite, link rewrite, controlle action

Hi everyone,

obviously I did not understand the url rewrite management. The thing I want to do is the following. I got this link:


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:







                    	// offers



                    	// GII

                    	'gii' => 'gii',

                    	'gii/<controller:\w+>' => 'gii/<controller>',

                    	'gii/<controller:\w+>/<action:\w+>' => 'gii/<controller>/<action>',



I think the pattern should be:


Otherwise you’re saying you want to get this url: <domain>/user/id/<ID>/offers

Then, to get the link you should use (if I’m not wrong)


Great, works fantastically! Thanks a lot!