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
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 ...

Essay Writing Uk
Hosted Ecommerce Software
Find Online Dating
Create An Online Store
Wedding Maldives
University Essay
Write My Dissertation Uk
Buy Uk Dissertation
Dissertation Services
Masters Dissertation Uk
Dissertation Help Uk
Buy Dissertation Uk
Masters Dissertation
Professional Dissertation Service
Write My Dissertation