PHP header location absolute URL
PHP Snippet 1:
header("location:http://www.example.com/path/to/myfile.php");
exit;
PHP Snippet 2:
$url = $_SERVER["HTTP_HOST"]."/path/to/myfile.php";
header("location:".$url);
exit;
header("location:http://www.example.com/path/to/myfile.php");
exit;
$url = $_SERVER["HTTP_HOST"]."/path/to/myfile.php";
header("location:".$url);
exit;