Codeigniter 2.0默认控制器的子文件夹不工作在服务器,但工作在本地主机


Codeigniter 2.0 default controller for sub folder not working in server but working in localhost

我已经在本地机器上设置了一个虚拟主机(假设它是http://local.he)。我在主"控制器"文件夹中有一个home.php。我在"控制器"文件夹中有两个子文件夹,它们是"admin"answers"wori",每个文件夹都有一个home.php文件。

Per CI 2.0结构,如果我访问http://local.he/module/wori那么它应该从' wori '加载home.php并且它正在工作,但是当我在上传文件后在服务器中做同样的事情时,它总是从模块加载。即使我访问像这样的东西:http://site.com/module/wori/users,它仍然从模块加载home.php

.htaccess

RewriteEngine on
RewriteCond $1 !^(index'.php|images|js|css|static)
RewriteRule ^(.*)$ index.php/$1 [L]

这是路由,这两个是routes.php中唯一可执行的行

$route['default_controller'] = "home";
$route['404_override'] = '';

当我尝试访问http://site.com/module/index.php/wori或http://site.com/module/index.php/wori/users然后它工作。我检查了.htaccess,它正在为我网站上的其他模块工作。我甚至试过这个例子:CodeIgniter默认控制器在子目录不工作,但这仍然不工作:

$route['wori'] = 'wori/home';

谁能告诉我少了什么?

我遵循了以下url的答案,它对我有效。

http://codeigniter.com/forums/viewthread/181149/# 857629

还想知道为什么它像在本地主机一样正常工作。