Use Htaccess To Redirect Old Domain To New

Wednesday 20th April 2005 05:43:00 AM

If you ever change your domain name and want your existing traffic redirected from the old to the new, htaccess is simply a great way of acomplishing this.

The code below redirects users as well as search engines informing them that the pages have moved permanently to the new address. It will also redirect any subdomains.

RewriteCond %{HTTP_HOST} ^(.*)olddomain.com$ [NC]
RewriteRule ^.*$ http://www.newdomain.com%{REQUEST_URI} [R=301,L]


Posted by Piniyini in Htaccess

<< I'm going to sexually molest your dog   Toseef's Blog   Website To Include WWW As Prefix Or Not? >>

Search

Feeds (Subscribe via Google Reader)
blog posts feed Blog Posts
recent comments feed Recent Comments

Archives
2012  Mar
2011  Sep  Oct
2010  Feb
2009  Jan  Mar  Apr  May  Jun  Jul  Oct  Nov
2008  Jan  Feb  Apr  May  Jul  Oct  Nov  Dec
2007  Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec
2006  Jan  Feb  Mar  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec
2005  Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec
2004  Aug  Sep  Nov  Dec
Recent Comments
Check out my Blog Roll
/Htaccess

Says thanks to the following poeple for recently leaving a comment ...

Meblibel
Xbox 360 Repair
Nike Free Shoes
Design A Logo
World Baseball Umpire Videos
Snapback Hats
Assignment Help
Small Business Marketing Servi
Pay To Write A Dissertation
Pay Someone To Write My Disser
Assignment-help
Masters Dissertation Topics
Gdc
Chapel Hill News
Mba Dissertation Ideas