controllerMap does not work properly


I got application generated by yiic. I’ve added url manager to switch url’s to path style and installed yum user management module. Then I created entry for controllermap in main.php config file like this.






It resolves the controller, but the error I get is: SiteController cannot find the requested view "index". It happend after request under: http://localhost/portal/str.

The index view exists (it is view associated with index action of default site controller. When I switch controllerMap off and make request to http://localhost/portal/site, Index view gets rendered.

I’d be grateful for all help.

Best regards

Ok, I managed to figure it out. I had to change the view folder to str to make it work, strange though.

I have another question.

I’ve got Yii user management module in my application. Can make something like controllerMap to module (moduleMap)? I want to switch the url from app/user/user/login to app/user/login (or at least main/user/login) How can I do that?

You can use URL rules to do that. A rule for your case could look like:

'app/user/login' => 'app/user/user/login'