I am trying to work out a URL rule to apply to convert the following url
http://localhost/page/viewjob/id/85345/Php-Developer-Required
where ‘page’ is the controller and ‘viewjob’ is the action and ‘id’ is the parameter
I need to convert it to an seo friendly url which is below
http://localhost/jobs/85345-Php-Developer-Required
The current setup I have in the config file is as follows.
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName' => false,
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
'/jobs/\w+' => '<page>/<viewjob>/id-\w+',
),
),
I have tried to reading the manual several times but don’t really understand the rules that well and how
to apply it in this case.