PHP - Using Absolute URLs with header()
// Redirects a user to the current domain, the current directory, and the new page. Won't break if you move the scripts to another folder/domain etc.
header ("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/newpage.php");