I have a paginated display in which on each page call I set the current URI string into a session (in my controller).
$current = $this->uri->uri_string(); $this->session->set_userdata('return_to', $current); From the view the user can click a link to go somewhere else (an edit form), which when submitted (and form validation is correct) I want to return to the correct page of the paginated results.
if($this->form_validation->run('edit') == TRUE ) { $back_to = NULL; $back_to = '/'.$this->session->userdata('return_to'); .... redirect($back_to); } Seems to work sometimes in Firefox but dies in Chrome, redirect to favicon.ico
Any and all help appreciated
UPDATE: My problem isn't due to relative/absolute addresses, for some weird reason in the second controller the redirect aims to favicon.ico, not what was stored in the session.
$back_to = site_url() . $this->session->userdata('return_to');?