1) situation: On some page the user can use an file upload form to upload a text (or excel) file. After successful upload the user should be redirected to a page where he can do whatever with his file.
2) My controller class:
...
if (!$this->upload->do_upload('fileupload')) {
echo "error file upload not successfull";
}else {
redirect('import/filepreview/');
}
3) what happens
First nothing appears to happen. The file has been uploaded but the page doesn't change. While using firebug extension it appears there has been sent a Header containing a get request to the proper target url and all the expected content is in the answer. But not displaying on site.
I actually don't know what I am doing wrong.
Solved the problem but only using a workaround. Finally I used javascript redirection
window.location.replace("http://new.../x_id");
with an x_id which the servers answer to the file upload.
So everything works fine for me. But the original question, why CI's redirect does not work is still open for me.