I have a problem while routing my requests in Yii. Following is the urlManager rules:
'rules'=>array(
array('api/index', 'pattern'=>'api/<model:\w+>/<id:\d+>/*', 'verb'=>'GET'),
array('api/shortlist', 'pattern'=>'api/<action>/<model:\w+>/*', 'verb'=>'GET'),
array('api/compare', 'pattern'=>'api/<action>/<model:\w+>/*', 'verb'=>'GET'),
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
My requests get routed to api/shortlist
even if I hit the api/compare
link.
What am I doind wrong here?