Page 1 of 1

Page redirection with PHP

Posted: Fri Jan 28, 2005 12:25 pm
by reuben
Hi I am using:

Code: Select all

header("Location: mypage.php");
to redirect to mypage.php. My problem is that when redirecting, the Interet Explorer address bar remains with the old URL, not with the page I just have been redirected. How can I solve this? I really need to solve this problem because if the user hits F5 to reload the page, the 'old' page is loaded and not the page that I was redirected to.

Thanks,

Reuben

Posted: Fri Jan 28, 2005 12:29 pm
by feyd
sounds like you're using frames, as using the header redirect changes the url shown normally..

try placing the full url as the destination.

Posted: Fri Jan 28, 2005 1:38 pm
by timvw

Code: Select all

header('Location: http://example.com/mypage.php');
try the above instead. Because i don't think all browsers support that all very well, since it's rather pretty new. http://www.ietf.org/rfc/rfc3986.txt