Open 404.php file in theme (if it doesn’t exist, then create a blank 404.php file)
Paste the following code in the file:
1 2 3 4 5 |
<?php header("HTTP/1.1 301 Moved Permanently"); header("Location: ".get_bloginfo('url')); exit(); ?> |