Welcome Guest, Not a member yet? Register   Sign In
Redirecton problem on a live server
#1

[eluser]the future darlo manager[/eluser]
How do guys. Figured I would post this here. I reckon I've solved it but I would like to know this is an issue and this post might prove a help to others stuck on problems.

I have been steadily coding away my learning support site for work and decided this afternoon to see how it would look on a linux server. We currently don't have our server in yet at work so I uploaded it to my own website. I am going to recode my site in CI anyway so it would be good to see how the code works....

Anyway. I uploaded everything, set the database up and was ready to go. Loaded the base folder and expected to be met by my welcome screen. Nothing, no errors just a blank screen. I loaded a few other controllers, some worked, some didn't.

I noticed a pattern however. Controllers without any redirections in them worked perfectly. On the welcome controller I simply redirect the user to welcome/login. On that controller I check to see if they are logged in already. If they are they are redirected again.

I struggled for ages. So I did a 'classic' php redirect with the header and it worked. I went back to the CI way of doing it and simply removed the refresh part and it was working.

So it went from
Code:
redirect('/welcome/login', 'refresh');
to
Code:
redirect('/welcome/login', '');

I am curious to why it might be doing this? Is this something else others have had to do or is it just my hosting company? Either way this might be of help to someone.




Theme © iAndrew 2016 - Forum software by © MyBB