URL pattern for Rest interface not working

Hi,

I am trying to set up URL routing rules without success this far. Here are some of my rules:





        'urlManager'=>array(

            'urlFormat'=>'path',

            'showScriptName'=>false,

            'caseSensitive'=>false,

            'rules'=>array(

                '<controller:\w+>/<id:\d+>'=>'<controller>/view',

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

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

                /* business application API */

                array('businessapp/businessShops', 'pattern'=>'businessapp/businessShops/<username:\w+>', 'verb'=>'GET'),




My problem is this one:




                array('businessapp/businessShops', 'pattern'=>'businessapp/businessShops/<username:\w+>', 'verb'=>'GET'),



My request is being routed to the correct action, but I can not do $_GET[‘username’]. However, if I declare a route like this:




                array('businessapp/businessShops', 'pattern'=>'businessapp/businessShops/<id:\d+>', 'verb'=>'GET'),



I can get the $_GET[‘id’] parameter. What am I missing here?

Any ideas would be appreciated,

OMA

Actually, this is how you should do it :




array('businessapp/businessShops/<username:\w+>', 'pattern'=>'businessapp/businessShops', 'verb'=>'GET'),