What are the implications of using absolute URIs in the Location header for redirection in PHP scripts?
Using absolute URIs in the Location header for redirection in PHP scripts can cause issues when moving the script to a different domain or server. To avoid this problem, it is recommended to use relative URIs instead. This way, the redirection will always be relative to the current domain and will work regardless of where the script is hosted.
<?php
// Use relative URI for redirection
header('Location: /new-page.php');
exit;
?>