views:

28

answers:

1

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!

+2  A: 

Try changing $config['uri_protocol'] to each of the possible values listed in the config.php file. One of them may well get it working, as this is a common issue.

Phil Sturgeon
Thanks Phil - yes changing the URI_Protocol variable from AUTO to REQUEST_URI sorted the problem I think. I'll do further testing this afternoon.
fh47331
REQUEST_URI is the most common setting to fix this problem. If it worked can you accept the answer? :)
Phil Sturgeon