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.

<?php //Redirect for WordPress. //http://howifixedit.net header("HTTP/1.1 301 Moved Permanently"); header("Location: ".get_bloginfo('url')); exit(); ?>
Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay