Re-Write My Yii Application Url To More User Friendly Url

Hello Everyone,

I want to re-write my yii application url to more user friendly url.For e.g: http://localhost/smallwood/needitnow/products/3.html

Here ‘3’ is category Id and i want to replace with category name to pulled out from database like this

http://localhost/smallwood/needitnow/products/cablelockout.html. I have read Yii wiki and got i can be done using Custom URL Rule Classes but it is not well explained. Please help me to achieve above functionality. Any help/suggestion is most appreciated.

Before the wikis, you may want (ie should) read the "Definitive Guide to Yii": and then you can also check "Building a Blog System Using Yii":