URL Management dynamic parameters

I am trying to work out a URL rule to apply to convert the following url


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


The current setup I have in the config file is as follows.



            'showScriptName' => false,





                '/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.

The rules above map the matches controller on the left and put it into the routing on the right. In your case you’ll want a rule something like:

'/jobs/<id:\d+>-.*' => 'page/viewjob'

Not tested.

I had to modify the code slightly but I think I am getting a bit more idea on

URL Management than I had before…


'jobs/<id:\d+>/*' => 'page/viewjob/id/<id>/',

Creates: http://localhost/jobs/85345/Php-Developer-Required

I have tried modifiying it further

'jobs/<id:\d+>-.*' => 'page/viewjob/id/<id>/',

But this doesn’t work

I needed to use the url below


What I don’t get is that I have already stored the


into variable


so why does replacing the ‘/’ with ‘-’

cause it to fail ??