What are the implications of not including the protocol in the header Location value for redirection?

Not including the protocol in the header Location value for redirection can lead to browser compatibility issues, as some browsers may not automatically prepend the protocol (http:// or https://) to the URL. To solve this issue, always include the full URL with the protocol in the header Location value for redirection.

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