urlManager and rules

Can any one tell me about the urlManager’s rules:

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

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

why we can only use id as a parameter? what if i want group_id or some thing else which is generic.

you can use:

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

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

without any problem. You have to remember that instead of $id you’ll use $group_id, and that’s all.