My Yii app uses different controllers (and views) depending on the sub domain, so I need to map the controller folder accordingly.
As a test, I’ve moved all the controllers into a subfolder of the normal controller folder and the put the following in main.php config. The subfolder is named ‘client’
"controllerNamespace" => "application.controllers.client",
As I understand it this should route all controller actions to this folder but it is not working. I get an ‘Unable to resolve the request “site/error”’ for all pages.
In stepping through CWebApplication I don’t understand how it could work as the controllerNamespace is applied after the $classFile path is created.
... $className=ucfirst($id).'Controller'; $classFile=$basePath.DIRECTORY_SEPARATOR.$className.'.php'; if($owner->controllerNamespace!==null) $className=$owner->controllerNamespace.'\\'.$className; if(is_file($classFile)) ...
What am I doing wrong?
Yii version 1.1.14.f0fee9