从URL中删除控制器名称

I'm using the PHP Yii framework and have stumbled upon an issue:

My URL currently looks like this: host.com/candidate/default/viewProfile/id/50

I want the URL to look like this: host.com/candidate/viewProfile/id/50

The module is called candidate.

Also, the following rule doesn't work: '/candidate/viewprofile/<id:\w+>' => 'candidate/default/viewprofile',

First thing can be / at the beginning (remove it). Second reason could be that before this rule you can have another rule that also matches your url - in this case just reorder rules and put that one to higher position (I mean nearer to beginning of rules array ;)).