ad box 728 x 90
ad box 468 x 60
Hardware, Software, Code, PHP, ASP, Games, Reviews and Other Funky Stuff
Subscribe

Enter your email address:

Pic of the Month
Popular Posts

PHP 301 Redirect on your wordpress 404.php

Now im not sure if this is a great idea for SEO purposes, but if you have recently purged old posts from your wordpress database, or have changed the permalink structure and dont want your visitors to keep seeing the “no posts found” page or the “404 Error Page”.

WordPress supports the 404.php page. I just added the following lines between the header and the footer tags to redirect back to the home page.


Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://iheadlines.info/" );
?>

Post Tags

This entry was posted on Monday, June 28th, 2010 at 11:33 am and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply

Spam Protection by WP-SpamFree