[SOLVED] urlManager regexp ignoring + sign

Hi there,

I have my urlManager set up with the following rule:


'<category:\w+>/<county:\w+>/<city:\w+>/<id:\d+>/*'=>'user/view',

This works fine until the category, county or city has a space in it. What I need to do is urlencode those three items, so if they have spaces, the url might look something like:


www.domain.com/some+category/city+of+london/london/123

This however pulls up a 404 error and can’t find the page. The following url works fine:


www.domain.com/somecategory/cityoflondon/london/123

But I have to have the urlencoded values in the url, so there has to be the + symbol and this seems to break the urlManager as it can’t find the page. Is there a regexp or something I can add in to the urlManager to ignore the plus symbol and treat it like a normal character?

Thanks,

Stu


'<category>/<county>/<city>/<id:\d+>/*'=>'user/view',

Worketh perfectly :D

Congrats!

I thought that some kind of lengthy regular expression should be needed.

Thank you for your simple solution!