Originally posted by erikwebb
If all you're doing is a simple redirection, I'd use basic JavaScript. It runs faster and it gives that much less strain on your server. Just a suggestion.
This isn't true. Not only is it slower, it's also client-dependant. It gives no less strain on your server since the page has to be retrieved from the server either way.
As Radon3k suggested, use the Location header to tell the browser to go to a new location. Unfortunately, older browsers do not realise how to process relative directories. Instead of using that code, you should use something that tells the entire location, even down to the server:
header("Location: [url]http://[/url]".$SERVER['HTTP_HOST'].dirname($SERVER['PHP_SELF'])."/newfile.php");
Hope this helps. (Including those who posted before myself.)