Creating 301 redirects
This is the correct and most search engine friendly way to redirect to a new URL for pages that have moved or been renamed. The redirect can be performed either by the web server, or by individual pages depending upon individual needs and circumstances.
Sample code/instructions for IIS, PHP and ASP below:
301 Redirect in IIS
- In internet services manager, right click on the file or folder you wish to redirect
- Select "redirection to a URL".
- Enter the URL you want to redirect to.
- Check "The exact url entered above" and the "A permanent redirection for this resource".
- Click 'Apply'.
301 Redirect in PHP
<? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.new_domain.com/newpage.php" ); ?>
301 Redirect in ASP
<% Response.Status="301 Moved Permanently";
Response.AddHeader("Location","http://www.new_domain.com/newpage.asp");
%>
0 TrackBacks
Listed below are links to blogs that reference this entry: Creating 301 redirects.
TrackBack URL for this entry: http://www.timsnotes.com/movabletype/mt-tb.cgi/2

Apache is a whole lot more complicated in that you have to be able to understand and write regular expressions.
Google .htaccess redirect for more information.