Notice! This document is currently in Archived status.
The content of this document may be incorrect or outdated.

Using .htaccess to redirect a web site on Apache

As web sites are migrated off of legacy servers it's important to establish a system to ensure visitors get to the new location. This can easily be done by creating a .htaccess file in the top level of your old web site. The .htaccess file should include the following commands:

RewriteEngine on
RewriteRule ^(.*)$1 [R=301,L]

These commands tell the web server that all traffic to your site should be directed to, if you are migrating your site to a different server the domain name should be altered.

The R=301 tells browsers and search engines that this move is permanent, which will result in search engines updating their indexes to refer to the new location.



Last modified: 2022/04/14 11:56:47.675671 GMT-4 by curtis.f.smith.1
Created: 2008/08/22 09:13:44.252000 GMT-4 by brian.r.brinegar.1.


Search the Knowledge Base


Quick search results

    Admin Options: Edit this Document