Only Default Controller Working |
Hi,
Only my default controller works. If I comment out my is_logged_in check, my default controller loads. If I do the same with any other controller, they do not work. So if I go to Welcome with log in check disabled, everything is fine. If I do log in check and get redirected to domain/auth/login, 404 page not found. this is my .htaccess in root folder.Mod_Rewrite works because I do get 500 internal error with mistakes in .htaccess file. Code: RewriteEngine on My config is: Code: $config['base_url'] = 'http://sub.domain.com'; I've tried so many different things and nothing works. I'm at a complete loss. Thanks for your help in advance.
try without your htaccess and specify index.php in your $config['index_page']
if http://sub.domain.com/index.php?/auth/login work, it's your mod_rewrite. if not, you maybe have a problem with apache or nginx. (can't use htaccess like that with nginx)
This my be related to the base_url config setting ... there was a change in CI3.0.3, described on the "upgrading" page:
http://www.codeigniter.com/user_guide/in...e_303.html
James Parry
Project Lead
not much info to understand, but i would make sure via apache logs if the URL is the expected one (to verify .htaccess works as expected) and if your controllers are in expected location.
Please keep in mind that first letter has to be uppercase in 3.X and onwards, both in file and in Class name. is this a new application you are working on, or you upgraded CI and then problem came up? (03-02-2016, 10:04 AM)keulu Wrote: try without your htaccess and specify index.php in your $config['index_page'] Keulu - That doesn't work either unfortunately. Thanks for ideas though. (03-02-2016, 05:17 PM)iz_no_good Wrote: not much info to understand, but i would make sure via apache logs if the URL is the expected one (to verify .htaccess works as expected) and if your controllers are in expected location. Controllers are uppercase but filenames were not, I switched to uppercase Auth.php and boom! Works, you are a legend! Thanks so much! (03-02-2016, 12:54 PM)jlp Wrote: This my be related to the base_url config setting ... there was a change in CI3.0.3, described on the "upgrading" page: Thanks for your idea, got solution, see above. Silly me! |
Welcome Guest, Not a member yet? Register Sign In |