This question already has an answer here:
And that's the problem. This works:
header('Location: http://www.[whatever].com');
That statement works to get the user to the [whatever] site--it displays just fine within the client window of the browser. The problem is that the URL is still being masked such that the user can't see the address string that she was just redirected to in the URL field, but rather she still sees the URL that she originally typed.
Is there a way to have the forward go through holistically, meaning not just the client area of the browser contains the final destination, but also the URL is the client destination's too?
</div>
If PHP performs
header('Location: http://www.[whatever].com');
exit;
the browser redirects to the specified URL http://www.[whatever].com
.
In case the redirect gets executed in an iFrame or an HTML frame, the URL isn't displayed in the the browser's URL field, since the original URL was not either.
In any other case, the URL field will reflect the redirected URL.