I am new to YII frame work.
My directory structure is :
Protected >> Modules
I have 2 modules site, admin inside the modules folder
Each module have model, view, controller folders
Config is available inside the protected.
If i open siteurl/admin
then i need to call the admin controller inside the admin module
If i open siteurl/
then i need to calll the site controller inside the site module.
In config i can able to set the default controller. But depending on the url the controller need to change. How to implement this.
I tried the following code
'urlManager'=>array(
'urlFormat'=>'path',
//'showScriptName'=>false,
'rules'=>array(
'admin/' =>'admin/admin',
'admin/login' =>'admin/index/login',
'admin/logout' =>'admin/index/logout',
'admin/<controller:\w+>/<action:\w+>'=>'admin/<controller>/<action>',
I able to call either admin controller or site controller. How to do this. Please help me.