301 Redirects for PHP
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.yoursite.com/new-page/" );
?>
Pretty straightforward. I just did it for a bed and breakfast client of ours.
You see, they had a page for their "Family Suite" room which they wanted changed to be the "Presidential Suite" because people were getting turned off by the whole "family" thing, since that's not generally what people go to bed and breakfasts for, and so they were losing all the people who were saying "I want a big room but not a room that's specifically for families."
So now if you go to where their Family Suite page was it will now redirect you to the Presidential Suite page, and the 301 redirect lets Google know that this is a permanent change, which effectively transfers the beneficial information Google has about the old page to the new one.
Comments
Another quick and effective way to accomplish this (whether it's PHP, ASP, HTML, etc.) is with a .htaccess file. I used that for a client's site redesign where almost every page had a new (and better optimized) URL.
Posted by: Nate at December 19, 2007 04:54 PM
Yeah, I like the .htaccess route better myself, since it provides centralized control over multiple pages and doesn't require that the file actually be on the machine, but in case somebody doesn't understand .htaccess files and just needs a quick fix this will do in a pinch.
Posted by: Joshua Steimle at December 19, 2007 05:05 PM

