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
SEO Poisoning - What are SEO Poisoning Attacks?
Viewed 1494 times since Mon, Apr 5, 2010
Web Application Security Tools & Scanner Applications
Viewed 1500 times since Mon, Mar 22, 2010
50 Free And Quality Web Icons
Viewed 1764 times since Tue, Jan 5, 2010
30 High Quality Charts & Graphs for Web Developers
Viewed 3256 times since Wed, Mar 23, 2011
Free JavaScript Charts Library - JS Charts
Viewed 1182 times since Sun, Dec 13, 2009
How to protect specific folder or disable directory browsing using htaccess?
Viewed 5880 times since Sun, Mar 14, 2010
Free JavaScript Date Picker - jsDatePick
Viewed 1586 times since Fri, Apr 9, 2010
Flash Webcam Image Capture
Viewed 1753 times since Thu, Nov 12, 2009