301 RedirectA 301 redirect is a special piece of code that tells web browsers (and robots) that a file has moved and then passes the new location. The browser automatically follows the redirection to the new location. You would use a 301 redirect when you move a page but have external links pointing to that page or that page is indexed in a search engine. Eventually the search engine will pick up the different link. You can also use a 301 redirect to force either a www or non-www scheme on your site. With the code below, if someone goes to bobs-site.com it will automatically send them to www.bobs-site.com. The code below goes in your .htaccess file. Be careful if you're using FrontPage as changes to the .htaccess file can cause problems. RewriteCond %{HTTP_HOST} !^www.mydomain.com [NC] If you are only temporarily moving a file, you can use a 302 redirect instead. |
