Just Another GetSimple Website
Reorganizing your website
When you move pages around on your website, you risk a visitor not finding your content. One school of thought says that Cool URIs don't change. While we all try not to break things more than we have to, moving a page is more than just hitting the rename button in your FTP client.
If you have to move a page, site, or folder, be kind to your users and the search engines. Just because you stop creating pages in static HTML, and start using a scripting language, doesn't mean your users even need to notice. Deciding that a page that stood alone before should now be grouped with others like it shouldn't make your visitor have to find the page all over again.
The HTTP specification gives you several ways of dealing with files that have moved or been deleted. To keep search engines and users up to date, you should tell them what happened. If you truly delete a file, and it has no real updated version or related file, mark it as "Gone". If you're having some kind of temporary issue where a file will be living somewhere else for a while, say for consuming too much bandwidth, it's status should be "Moved Temporarily." If the file actually needed to be relocated, and that's where it's going to stay, it should return ""Moved Permantly.""
With Apache, you can handle return these status messages using a plugin called mod_rewrite. To use any of the below examples, it must be already installed on the server. Enable it by placing the following line in your .htaccess file, which is generally located at the top level of your web folders.
Rewrite Engine On
To return a Gone message (status code 410):
RewriteRule ^DeletedPage\.html$ - [G]
To return a Moved message (status codes 301 and 302):
# number signs denote comments in .htaccess301 Moved Permanently
RewriteRule ^MovedPage\.html$ http://www.thedomain.com/$1 [R=301,L]
302 Moved Temporarily
RewriteRule ^MovedPage\.html$ http://www.thedomain.com/$1 [R=302,L]
For more information about HTTP status codes, see: HTTP/1.1: Status Code Definitions.