Redirecting Pages using .htaccess
This quick post explains how to redirect users to different pages on your website and in theory, not harm your Google Page Rank. Basically using the 301 error code tells a search engine or browser that the file was once there, and it has permanently moved.
Error 3o1: Permanently Moved should not be confused with the more frequently seen Error 404: Page Not Found. This error code is generally used to indicate that content does not exist anymore. Error 404’s will eventually filter out of search engines over time.
Note: It is assumed you have a general understanding of how to make/edit a .htaccess file.
To relocate one page use this snippet:
Redirect 301 /oldpage.php http://www.yoursite.com/newpage.php
You can add as many of these lines to your .htaccess file as needed. However, if you would rather just move all 301 errors to your main page (or any page for that matter), use this snippet of code:
Redirect 301 / http://www.yoursite.com
There are many other ways to handle a redirect, but this way I find is the easiest and requires the least amount of coding.
Tags: .htaccess, Error 301, Error 404 Page Not Found, Permanently Moved













