Welcome Guest, Not a member yet? Register   Sign In
Bug in Router
#6

[eluser]WanWizard[/eluser]
It is imho not a bug, because it was never a feature.

There is only one default controller, which is used when you don't specify any URI segments. In all other cases, you need routes or a generic 404 controller to capture URI requests.

If you need a default controller for admin, all you need is
Code:
$route['admin'] = 'admin_main'
which will load the admin_main controller if someone requests http://my.site/admin.

What you want is not possible in the default setup, and something that imho you shouldn't fix like this. You basically want a per-URI-segment 404 capture (i.e. if it starts with /admin/, and the second URI segment can't be found, load this specific controller).

My 2ct: rethink your design, you're making it very difficult on yourself.

p.s. don't talk about subdirectory (which is a term related to filesystems) when you mean URI segment. Very confusing.


Messages In This Thread
Bug in Router - by El Forum - 03-20-2011, 05:08 PM
Bug in Router - by El Forum - 03-20-2011, 11:26 PM
Bug in Router - by El Forum - 03-21-2011, 04:45 AM
Bug in Router - by El Forum - 03-21-2011, 05:46 AM
Bug in Router - by El Forum - 03-21-2011, 07:44 AM
Bug in Router - by El Forum - 03-21-2011, 10:44 AM
Bug in Router - by El Forum - 03-21-2011, 11:11 AM
Bug in Router - by El Forum - 04-15-2011, 12:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB