Codeigniter only loads the default controller
Posted
by fh47331
on Stack Overflow
See other posts from Stack Overflow
or by fh47331
Published on 2010-05-18T22:46:13Z
Indexed on
2010/05/18
22:50 UTC
Read the original article
Hit count: 212
I am very new to CodeIgniter, but have been programming PHP for ages. I'm writing some software at the moment and using CI for the first time with it.
The default controller is set to the first controller I want to action call 'login' (the controller is login.php, the view is login.php. When the form is submitted it calls the 'authenticate' controller. This executes fine, process the login data correctly and then does a redirect command (without any output to the screen prior) to the next page in this case 'newspage'. The problem is that the redirect, never reaches 'newspage' but the default controller runs again.
It doesn't matter what I put ... ht tp://domain.name/anything ... (yes im using .htaccess to remove the index.php) the anything never gets called, just the default controller. I have left the standard 'welcome.php' controller and 'welcome_message.php' in the folders and even putting ht tp://domain.name/welcome all I get is the login screen! (Obviously there shouldn't be a space between the http - thats just done so it does not show as a hyperlink!)
Can anyone tell me what i've done wrong!
© Stack Overflow or respective owner