jcadima
8/14/2017 - 4:48 PM

Redirect Old pages to Home ( Same Website, not different domain)

Redirect Old pages to Home ( Same Website, not different domain)

https://webmasters.stackexchange.com/questions/61466/htaccess-redirecting-404-urls-to-index-page

Put this in the Wordpress 404.php page, at the very top

<?php 
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".get_bloginfo('url'));
exit();
?>