EllisLab/CodeIgniter — Issue #1076: $routing['directory'] not working properly
Author: marcosgdf
Created: 2012-02-24 04:02:11+00:00
State: open

This is a duplicate of the closed issue #175 which I think it's not solved yet.

I'll tell you my problem.

I've got 2 "subdomains" and both share the same codeigniter code. "www.xxxx.com" loads the main index.php file and "sec.xxxx.com" loads sec/index.php.

sec/index.php is using $routing['directory'] = 'sec'; because I only want to load from "sec.xxxx.com" the controllers placed in "application/controllers/sec/".

I have 2 controllers, the first one is "application/controllers/abc.php" and it can only be loaded from "www.xxxx.com". The second one is "application/controllers/sec/abc.php" and it should only be loaded from "sec.xxxx.com".

Everything woks fine until I delete "application/controllers/abc.php". If you delete that file, "sec.xxxx.com/abc.php" won't load as CodeIgniter throws a 404 error but the file still remains in "application/controllers/sec/abc.php".

I think the problem is in /system/core/Router.php, line 273. It tells that the file doesn't exists because it is looking for it in "application/controllers" and not in "application/controllers/sec" as told in $routing['directory'].