Sazzad-Ul Islam
Sazzad-Ul Islam

Reputation: 33

regular expression for url manager in yii is not working

enter image description hereI have used regular expression at url rules manager in my project and it's on yii framework. But it's not working. How to solve this problem??

I've written the URL like,

< cat_id:\d+ >/< cat_name:[\w\-]+ >/buying-offer'=>'frontend/allCategory/index',

Upvotes: 0

Views: 165

Answers (1)

Ali MasudianPour
Ali MasudianPour

Reputation: 14459

There is no problem with the regex in your code, but you have some additional spaces, so you need to remove them:

'<cat_id:\d+>/<cat_name:[\w\-]+>/buying-offer'=>'frontend/allCategory/index'

By above code: http://something/23/catName/buying-offer will be replaced with frontend/allCategory/index

Upvotes: 1

Related Questions