i have articles in my yii web application, i want to view article title instead of id at the url, i have followed this link: http://www.yiiframework.com/forum/index.php/topic/43874-urlmanager-show-title-instead-of-id/ i changed createUrl function to be :
Yii::app()->createUrl('home/article',array('id'=>$article->id,'title' => $article->title);
and add the following rules to url manager as below :
'<action:\w+>'=>'home/<action>',
'<action:\w+>/<id:\d+>'=>'home/<action>',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
'article/<id>/<title>'=>'home/article/view/'
article url now like :
http://localhost/test/article?id=6 i want to be
http://localhost/test/article/article-title
thank you in advance .