0
共享控制器這是我的路徑:自動加載在HMVC笨應用
/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和共享是包。 Calltek和Gestios是應用程序。
Calltek autoload.php負載從gestios和資源共享:
$autoload['packages'] = array(APPPATH.'../../gestios',APPPATH.'../../shared');
在我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應用程序發送給我一個404.
我calltek htaccess的它的優良:
RewriteEngine on
RewriteCond $1 !^(index\.php|media)
RewriteRule ^(.*)$ index.php/$1 [L]