function redirect_url($url){
echo '<script type="text/javascript">';
echo 'window.location.href="'.$url.'";';
echo '</script>';
}
<?php
header('Location: http://www.new-website.com/', true, 301);
exit();
?>
echo '<script type="text/javascript">';
echo 'window.location.href="'.$url.'";';
echo '</script>';
}
<?php
header('Location: http://www.new-website.com/', true, 301);
exit();
?>