Welcome Guest, Not a member yet? Register   Sign In
Autoload shared controllers in a HMVC codeigniter app
#1

I have problems loading shared controllers of a package:

This is my path:

Code:
/api
   calltek
       application
           config
           controllers
           ...etc
       index.php
       .htaccess
   empresite
       application
           config
           controllers
           ...etc
       index.php
       .htaccess
   gestios
       config
       controllers
           Gestios_login.php
           Gestios_profile.php
       libraries
       models
   shared
       config
       helpers
       language
       libraries[/b]

Gestios and Shared are Packages. Calltek and Gestios are apps.

Calltek autoload.php loads resources from gestios and shared:

Code:
$autoload['packages'] = array(APPPATH.'../../gestios',APPPATH.'../../shared');

And in my routes.php i define paths calling a Gestios Controllers:

Code:
$route['auth'] = 'gestios_login/index';
$route['avatar'] = 'gestios_profile/avatar';
$route['profile/me'] = 'gestios_profile/me';
$route['profile/avatar'] = 'gestios_profile/avatar';
$route['profile/avatar/(:num)'] = 'gestios_profile/avatar/$1';
$route['profile/config'] = 'gestios_profile/config';

When i try to navigate to example.com/api/calltek/auth app send me a 404.

My calltek .htaccess it's fine:

Code:
RewriteEngine on

RewriteCond $1 !^(index\.php|media)
RewriteRule ^(.*)$ index.php/$1 [L]
Reply




Theme © iAndrew 2016 - Forum software by © MyBB