.htaccess 在HMVC codeigniter应用程序中自动加载共享控制器

.htaccess 在HMVC codeigniter应用程序中自动加载共享控制器,.htaccess,codeigniter,routes,controllers,hmvc,.htaccess,Codeigniter,Routes,Controllers,Hmvc,这是我的路径: /api calltek application config controllers ...etc index.php .htaccess empresite application config controllers ...etc ind

这是我的路径:

/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
Gestios和Shared是软件包。Calltek和Gestios都是应用程序

Calltek autoload.php从gestios和共享加载资源:

$autoload['packages'] = array(APPPATH.'../../gestios',APPPATH.'../../shared');
在my routes.php中,我定义了调用Gestios控制器的路径:

$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';
当我尝试导航到example.com/api/calltek/auth-app时,请向我发送404

我的calltek.htaccess很好:

RewriteEngine on

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

Case Codeigniter NOT autload de controller作为我找到的包()和替代解决方案:

只需创建第二个控制器并扩展共享控制器:

<?php defined('BASEPATH') OR exit('No direct script access allowed');

require APPPATH.'/../../gestios/controllers/Gestios_login.php';

class Auth extends Gestios_login {
    public function __construct(){
        parent::__construct();
    }
}