• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Redirect is not working in Server

[eluser]A. Wadud[/eluser]
redirect() is not working in remote server but it works in localhost.
now, What can i do?
please help me.

Well maybe if you show your redirect code someone could help you!

[eluser]A. Wadud[/eluser]
My code is like this...and its work on localhost



Try putting a leading forward slash in front of "my" like:


[eluser]A. Wadud[/eluser]
But my base url is http://localhost/newspaper/

Did you change your base_url to match your live server?

$config['base_url'] = '';  // Let CodeIgniter figure it out!

You may also need to change the protocol
$config['uri_protocol'] = 'REQUEST_URI';

[eluser]A. Wadud[/eluser]
I am using $config['base_url']
because i need it in my
web like <?=base_url();?>

And the last you said that $config['uri_protocol'] = 'REQUEST_URI';
and i already use it.
but its working.

Change this to:
<?php echo base_url();?>

Your server may not have PHP short tags turned on.

[eluser]A. Wadud[/eluser]
Its working <?=base_url();?>

but redirect is not working.

Are you sure there is no other output before the redirect() call? If there is, that can stop the header from being used.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.