I need a rule for http://example.com/post/view/id/1 url that will be displayed like this http://example.com/post/post_title. Instead of the id number i want to display the post name or title.
My config looks like this:
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
//'<controller:\w+>/<id:\d+>'=>'<controller>/view',
//'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
//'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
'showScriptName'=>false,
),