1

Hello friends I have one problem with redirect function if I try this it´s works I get to redirect to google.es

redirect('http://www.google.com'); 

but if I try this

$url= 'http://www.google.com';
redirect($url,'refresh');

i obtain this http://127.0.0.1/mywebfolder/http://www.google.com

how i could to fix? thanks

htmlpower
  • 169
  • 1
  • 16

1 Answers1

1

Try loading this

$this->load->helper('url');

Then do the redirect

$url= 'http://www.google.com'; redirect($url,'auto');

Auto is usually default so your don't need to use it you can just use $url= 'http://www.google.com'; redirect($url);

Reuben Gomes
  • 878
  • 9
  • 16