if your user and question controller has action view
.Here view should be the name of action.
Try this:
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'appendParams' => true,
'caseSensitive'=>false,//use case sensitivity here
'rules'=>array(
'<controller>/<view_id:\d+>/<title_name:[\w -\.]+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
)
If your Url is like this
http://stackoverflow.com/question/1/title
When you hit this url.In main.php this line will read your url.
'<controller>/<view_id:\d+>/<title_name:[\w -\.]+>'=>'<controller>/view',
//view_id and title_name you can change there name.
It will work like this:
<controller>=question
<view_id:\d+>=1
<title_name:[\w -\.]+>=title
and you will redirect to <controller>
's function actionView()
automatically.You can get the url values like this $_GET['view_id']
AND $_GET['title_name']
in actionView().
You have to Do this:
public function actionView()
{
$this->render('view', array( 'model' => $this->loadModel($_GET['view_id'])));
}