Hey, so i have been using this function in every project or page i work on.
function redirect_to($location = NULL) {
if ($location != NULL) {
header("Location: {$location}");
exit;
}
}
And now i checked Opera and that redirect don’t work there? So this is very frustrating how should i fix it so it also works in Opera browser?
Every other browser i have works perfectly: FF/IE/Chrome.
Also i might note that i do not have any output before that header and there is no spaces or free lines.
Thanks.
Opera should work fine with header redirects.
As @stillstanding says, make 100% sure the line is reached in the first place. Do a test output of something else (
echo "test";) and see whether that is visible.According to specifications, header redirects require an absolute URL (even though clients usually support relative ones). Try whether this helps.