CodeIgniter Forums
Problem with HMVC + CI 2.1 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Problem with HMVC + CI 2.1 (/showthread.php?tid=46863)



Problem with HMVC + CI 2.1 - El Forum - 11-18-2011

[eluser]memVN[/eluser]
I use HMVC to biuld with CI 2.1
structure my code as follows:
application
| Controller
| Home.php
| Models
| Views
| Home.php
| Core (container core HMVC)
| thirt_party (container MX - HMVC)
| Modules
| Welcome
| Controller
| Welcome.php
| Views
| Welcome_message.php

In the routes.php file I config default_contrller ='home';
And site it's worked
However, when I run link http://abc.com/index.php/welcome/welcome is problem errro follow:
Code:
Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.

Who can help me? Thanks



Problem with HMVC + CI 2.1 - El Forum - 03-21-2012

[eluser]dblackherod[/eluser]
is there a home method in your welcome controller? If no, then create one.

Form your uri, it means that you have a controller welcome in welcome module but the description of your problem suggests that you do not have a home method in the controller.

Also, since there is a controller with the same name existing in the module, then you do not need to specify it in your URI.

So, in essence,

http://example.com/index.php/welcome/welcome is the same as http://example.com/index.php/welcome