Let's say we have a page http://linuxscripter.blogspot.com/foodrecipes.html
After maintaining the page for years, I decide to re-organize the website structure, put everything related to food in one directory. But over the years, the original page may have been booked marked by hundreds of visitors, and have been cached by many search engines. When someone access the original page either through bookmark or search engine, we need to inform him that the pages have been moved to new locations.
To do this, there are a few ways:
1. Create a hyperlink in the original page, connecting to the new page.
<a href=/food/recipes.html>recipes at new location</a>
This way requires visitor to click the link to view the new page, apparently, it's not a good idea.
<meta HTTP-EQUIV="REFRESH" content="0; url=http://linuxscripter.blogspot.com/food/recipes.html" />
Both 2 and 3 can redirect the page to new location, but they are using 302 redirect, it's not SEO friendly. To avoid affecting the search engine visibility, it's better to use 301 redirect. For static pages served by Apache, we can use RewriteRule to achieve this.
4. Auto redirect using Apache RewriteRule
RewriteRule ^/food_recipes\.html$ /food/recipes.html [R=301,L]
In this way, it tells search engine that foodrecipes.html has been moved to /food/recipes.html permanently, search engine will not treat /food/recipes.html as new page.