1
votes

I'm using Asgard CMS, which is a modular CMS built on Laravel 5.1, and facing above mentioned issue with a specific module that I created.

There are lots of post request and redirect all over the site, which works fine, but when it comes to Profile module, I got this problem.

I post an edit request to a route, after some work, I redirect back. When I redirect, it shows a blank page with "Redirecting to http://www..." written on it first, then redirects, after 2-3 seconds.

Anyone knows what causes this intermediary page?

3
can you write your redirection code here? - tersakyan
I use return redirect()->back(). I have found the solution, explained below. Thank you anyway. - yenerunver

3 Answers

0
votes

Can you control your PHP opening tags? If they are not starting from the first line (whitespace before them), browsers can do that.

0
votes

try this code...

redirect()->away('https://www.google.co.in');

0
votes

It turns out that one of the language files that I include, I mistakenly left the Encoding type as UTF-8.

When turning that to Without BOM, problem solved.

Thank you for your help.