SEO 301 redirects and rewrites
The difference between a redirect and rewrite is:
• Rewrite is a Server-Side operation
• Redirect sends an immediate response to the Client
When creating a new page you should always either 301 redirect or rewrite from the old page. A 301 redirect tells a Search Engine that a page has been permananetly moved, so all the “link juice” or pagrank from the old page is eventually redirected from the old page. Imagine if you got lots of links from different websites to an old page, you then rename and delete the old page, all those links you got would be wasted. Consequently when your rewrite engine is on you should follow this protocal and let the Search Engine pass on all that link juice to the new page:
So in the .htaccess at the root of your website save:
RewriteCond %{HTTP_HOST} ^website.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.website.com$
RewriteRule ^olddirectory\/file\.html$ “http\:\/\/www\.website\.com\/newdirectory\/ fileinnewdirectory\-remember\-to\-escape\-hyphens\-and\-fullstops\.html” [R=301,L]
This is a quick way to control all your rewrites. If you want to do static ones on a php page:
<?php
// Permanent redirection
header(”HTTP/1.1 301 Moved Permanently”);
header(”Location: http://www.website.com/”);
exit();
?>



















