To do a permanent redirection using PHP, for whatever SEO needs you may have, the code is
//Standard 404.php file
//Looking for my tnmailserver?
if(strpos($_SERVER[“REQUEST_URI”], “/Projects/TNMailServer-Full.aspx”) !== FALSE)
header(“HTTP/1.1 301 Moved Permanently”);
The exit is importantly, especially if you still have other code below this snippet performing other checks, or showing the standard 404 page.