I have set up a virtual host in my local machine (assume it to be http://local.he). I have a home.php
in the main ‘controllers’ folder. I have two subfolders inside the ‘controllers’ folder and they are ‘admin’ and ‘wori’ and each has a home.php
file.
Per CI 2.0 structure, if I access http://local.he/module/wori then it should load home.php
from ‘wori’ and it is working but when I did the same in the server after uploading the files it always loads from module. Even if I access something like this: http://site.com/module/wori/users, it is still loading the home.php
from module.
Here is the .htaccess
RewriteEngine on
RewriteCond $1 !^(index\.php|images|js|css|static)
RewriteRule ^(.*)$ index.php/$1 [L]
Here is the routing and these two are the only executable lines in routes.php
$route['default_controller'] = "home";
$route['404_override'] = '';
When I try to access http://site.com/module/index.php/wori or http://site.com/module/index.php/wori/users then it works. I checked .htaccess
and it is working for other modules in my site. I even tried this example: CodeIgniter default controller in a sub directory not working but this is still not working:
$route['wori'] = 'wori/home';
Can anyone tell me what is missing?