Redirect, but keep uri the same
Posted: Tue Feb 20, 2007 7:06 pm
Is there any way WITHIN PHP or with headers to redirect somebody to a new location, but keep the URI the same (in the URL)?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?php
header('Location: http://www.newlocation.com' . $_SERVER['REQUEST_URI']);
?>if run form: http://www.oldsite.com/something/index.phpThe Ninja Space Goat wrote:wouldn't that just redirect me to the same page I'm on? I need to redirect to a new location.