// If header throws an error - use this as temp solution.
<?php
echo '<script type="text/javascript">
location.replace("https://your_replaced_url_location_goes_here.com/"); </script>';
?>
<?php
echo "<script>window.location.href='target.php';</script>";
exit;
?>
header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP