1<?php // Permanent 301 Redirect via PHP
2 header("HTTP/1.1 301 Moved Permanently");
3 header("Location: http://domain.tld/new/location/");
4 exit();
5?>
1// Redirect page perminately
2header("HTTP/1.1 301 Moved Permanently");
3header("Location: https://www.yourfancynewsite.com/mypage.php");
4exit();