URL pattern for Rest interface not working


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









                /* 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,


Actually, this is how you should do it :

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