Welcome Guest, Not a member yet? Register   Sign In
back()
#1

Hi !


Here is piece of my App.php

PHP Code:
public $indexPage 'index.php'

So I always got "index.php" into my URI requests. That's ok.

But when I use this code

PHP Code:
return redirect()->back(); 

The URI generated is good except "index.php" is missing and the server generate a "file not found" error.

I think it might by a bug (?)
I should find a tricky solution to that but I just wanted to alert the CI developers.

Thanks!
Reply
#2

I use thisĀ 

PHP Code:
$uri = new \CodeIgniter\HTTP\URI(previous_url());
header('Location: '.site_url($uri->getPath()));
exit; 
Reply




Theme © iAndrew 2016 - Forum software by © MyBB