Follow below steps to setup HMVC in codeigniter(CI):
https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/downloads
1. Download zip from above URL and copy them into application folder of CI
2. Rewrite HTACCESS
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
3. Create folder called “modules” in application folder i.e. application/modules
4. Create a folder of particular module in modules folder. For e.g. application/modules/admin
5. Create controllers, models and views folder in particular module. For e.g. in application/modules/admin module
6. Create controller file controllers folder of particular module. For e.g. application/modules/admin/controllers/Admin.php
<?php
defined(‘BASEPATH’) OR exit(‘No direct script access allowed’);
class Admin extends CI_Controller {
public function index() {
$this->load->view(‘admin/dashboard’);
}
}
7. Following will be the structure:
That’s it…

