What are the guidelines for using absolute values in the Location header for PHP redirection?

When using absolute values in the Location header for PHP redirection, it is important to ensure that the URL provided is fully qualified and includes the protocol (http:// or https://). This will prevent any potential issues with redirection not working properly due to incomplete URLs.

<?php
$url = "http://example.com/newpage.php";
header("Location: " . $url);
exit();
?>