Article Diary - General Knowledge Digest

How to redirect an old domain to a new domain using htaccess?

You can redirect an old domain name to the new domain using htaccess file. This uses the 301 redirection that is SEO friendly.

# redirect from old domain to new domain

RewriteEngine On
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]

Put this code in your .htaccess file to redirect an old domain name to new domain name.

5 (1)
Article Rating (1 Votes)
Rate this article
Attached Files
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Name
Email
Security Code Security Code
Related Articles RSS Feed
UI Patterns - User Interface Design Pattern Library
Viewed 1288 times since Thu, Dec 31, 2009
PHP Script For PDF to HTML Conversion
Viewed 5782 times since Tue, Dec 15, 2009
SlideDeck - Cool jQuery Slideshow Plugin
Viewed 1230 times since Thu, Feb 4, 2010
What is jQuery?
Viewed 965 times since Tue, Dec 1, 2009
Coming Soon Template
Viewed 1180 times since Thu, Nov 12, 2009
Use PHP Functions In JavaScript with PHP.JS Library
Viewed 1004 times since Fri, Jan 8, 2010
Free Android GUI PSD File
Viewed 1418 times since Fri, Dec 4, 2009
File Upload in PHP - PHP File Upload Script
Viewed 2421 times since Thu, Nov 5, 2009
Search Engine Optimization: Tags of Importance for SEO
Viewed 1076 times since Tue, Oct 12, 2010