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

[eluser]EdemOne[/eluser]
Hi,
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?
#2

[eluser]InsiteFX[/eluser]
Do a form search on GoDaddy.
#3

[eluser]EdemOne[/eluser]
I did but i didn't get anything related to my problem, is there a way you can help me out?
#4

[eluser]EdemOne[/eluser]
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.
#5

[eluser]CroNiX[/eluser]
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