Home page URL in Yii

Here i added the code to "how to set and get the home page url in yii"

Set Home Page Url


...............
'homeUrl'=>array('user/index'),
'components'=>array(
    ...............
),
...............

Get Home Page Url


$homeurl=Yii::app()->homeUrl;
//redirect home page
Yii::app()->request->redirect(Yii::app()->homeUrl);