Welcome Guest, Not a member yet? Register   Sign In
Redirect function not working on hosting server

I am just finished developing an application which i made use of the redirect() function to send the user to another page. The redirect() function was properly working when i was hosting the application on my local server. But since i have hosted it on an external server(Godaddy Linux Hosting), the redirect() function stops to work. Every time i redirect a user to a page i get a blank page. Can you please help me solve this issue?

Do a form search on GoDaddy.

I did but i didn't get anything related to my problem, is there a way you can help me out?

I finally solve the problem, the redirect is now working after i remove this statement
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
that comes after the opening php tag from one of my model core functions that i created.

That's a security feature so that someone can't call your model (or anything else like controllers, etc) directly from the URL. BASEPATH gets defined at the bottom of index.php and CI uses it all over the place internally, so it should exist since everything routes through index.php before anything else.

You may have gotten it working, but most likely you have a bigger issue going on and you now have opened a security hole. I'd advise you to keep looking for the cause.

If you google "codeigniter godaddy", you will see plenty of issues with them as a host, and some workarounds. Personally, I'd never use them as they don't seem to have a standard setup.

Theme © iAndrew 2016 - Forum software by © MyBB