Posts tagged 301
301 ReDirect For WordPress Back To Home Page Instead Of 404 Error Page.
07 years ago
If you delete posts in WordPress that were once indexed by Google or bookmarked by one of your visitors, if they re-visit the link they’ll get your 404 error page. The code below simply will re-direct them to your homepage. Just copy the code to a file and rename it to 404.php. In my WordPress installation, i just replaced the existing 404.php file in wp-content/themes/themename/ with the code below.