Hide default controller name and action name from URL

Hi Friends ,

I’m new to YII framework , I have to hide the default controller name and function name . For Ex :

(Existing URL : localhost/food/store/home )

(Required URL : localhost/food/ )

in YII framework in config page they have declared the urlmanager as

URL Manage in config page :

‘urlManager’=>array(

‘urlFormat’=>‘path’,

‘showScriptName’ => false,

‘rules’=>array(

‘<controller:\w+>/<id:\d+>’=>’<controller>/view’,

‘<controller:\w+>’=>’<controller>/index’,

‘<controller:\w+>/<action:\w+>/<id:\d+>’=>’<controller>/<action>’,

‘<controller:\w+>/<action:\w+>’=>’<controller>/<action>’,),

‘showScriptName’=>false,)

Default Controller Declaration :

‘defaultController’=>‘store’

So please help me how to display only the (baseurl) localhost/food/ that load the default controller and action .

Thanks in advance

Hi Navaneeth,

This link may be help you -> http://www.yiiframework.com/forum/index.php/topic/5372-change-default-controller-action/

Cheers!

Happy Coding