URL shows error 404 instead of default controller |
Hi,
I'm looking for a bit of guidance with this one, as it's proving to be a bit tricky! My set up is as follows:
PHP Code: $route['404_override'] = ''; However, visiting just 'another.example.com' shows a 404 rather than /another/login Hopefully I've given more than enough info, but knowing me I've missed something simple! Any help appreciated!
Hi,
Not sure if this is the cause of your problem, but your controllers directory can only have files or one sub level of folders. So a controller called login can be in controllers/login.php or controllers/members/login.php but not controllers/another/members/login.php as CI will assume 'members' is the class name in that case. I hope that makes sense and might be of some help, Best wishes, Paul.
Hi Paul,
Thanks for your reply! Login.php (the controller) is stored at /controllers/example/Login.php. However, on that note, I do have other folders in /example/ and they seem to load fine. I'm guessing that's not intended judging by your post, but it seems to work. I weren't aware that it was limited to one level of sub-folders for controllers so I just done what I thought would be best organisation wise. But thank you for your suggestion |
Welcome Guest, Not a member yet? Register Sign In |