Welcome Guest, Not a member yet? Register   Sign In
Multiple Applications & Routing Problem (Bug?)
#1

[eluser]omed habib[/eluser]
I'm running multiple websites with one installation of codeigniter. Each application has its own custom named 'application' folder and is being set in the index.php (as it should).

One of the applications has a folder in the controllers directory with controllers within it. The default for that controller is being set in the routes.php file, like this:

Code:
$route['manage'] = "manage/login";

The problem is, when I try to access mysite.com/manage, I get nothing. Furthermore, when I try to skip the routing and try to access mysite.com/manage/index, I still get nothing.

I'm forced to believe that multiple applications within a framework leads to the inability to setup directories to organize controllers. Does anyone have any experience/thoughts on this?

Thanks!
#2

[eluser]wiredesignz[/eluser]
Is "manage" a controller or a directory?, if it's a contoller there must not be a directory of the same name.
If it's a directory, you cannot have a Controller named Index. Can you explain the structure a bit more clearly.
#3

[eluser]omed habib[/eluser]
Whoops... typo.

/manage/ is a folder, so my controllers directory looks like this:

controllers/manage/login.php
controllers/manage/blog.php
#4

[eluser]wiredesignz[/eluser]
Ok, try:
Code:
$route['manage'] = "manage/login/index";
#5

[eluser]omed habib[/eluser]
wiredesignz, no luck. Still gives me the same 404 error.
#6

[eluser]Billy Khan[/eluser]
Did you manage a fix for this? I am having exactly the same problem. I moved my apps into applicaion sub dir and now the routing has stopped.

e.g.

Originally it was /admin which got me to my admin system
I have now moved it into application/admin and created an admin.php in the web root and modified the application var to application/admin.

I would like to do this:
/admin but i have to instead go to /admin/admin. No matter what i do with the routing in cant get it to find the controllers with just /admin.

My controllers are in sub dir as well, e.g. application/admin/controllers/login/c_login.php with my route set to:

"admin" = "login/c_login"
#7

[eluser]Billy Khan[/eluser]
I can confirm that when relocating the application folder, controllers in sub directories arent found. I tried it with a default CI installation. I relocated the application folder and moved welcome into hello/welcome and altered the route.

Is there a solution to this?
#8

[eluser]Billy Khan[/eluser]
Can anyone else confirm that this is that case? That when relocating the application folder, controllers in sub-directories arent loaded.

Reason is that i have developed my own CMS and have controllers all organised into subfolders and dont want to move them to the root of "controllers"




Theme © iAndrew 2016 - Forum software by © MyBB