Url Mapping To Different Name


I have controller with id project and we are accessing projects by


.I don’t want to show “project/index/id” in url instead of that url should look like



I have tried by putting following rules in url manager.

     mysite/<id:\d+>' =>'project/index/id/<id:\d+>',

                           // 'project/index/<id:\d+>' => 'mysite/<id:\d+>',

Can anyone please guide me, how to do it ?

This is basic url rewrite with Yii, the guide has more than enough to help you: http://www.yiiframework.com/doc/guide/1.1/en/topics.url

Don’t be afraid to read the guide, it’s long but it helps :)