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.

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
Facebook Style Chat Script - ArrowChat
Viewed 772 times since Tue, Aug 3, 2010
PHP Interview Questions with Answers - Part 1
Viewed 794 times since Mon, Jan 11, 2010
Meerkat - jQuery Plugin for Promotional Content
Viewed 688 times since Tue, Dec 29, 2009
45 jQuery Navigation Plugins and Tutorials
Viewed 1755 times since Thu, Jan 28, 2010
50 Free And Quality Web Icons
Viewed 1060 times since Tue, Jan 5, 2010
Use PHP Functions In JavaScript with PHP.JS Library
Viewed 676 times since Fri, Jan 8, 2010
Before and After Picture - jQuery Plugin
Viewed 981 times since Tue, Dec 29, 2009
Google Web Toolkit - Version 2 Released
Viewed 759 times since Tue, Dec 15, 2009
Web Application Security Tools & Scanner Applications
Viewed 1059 times since Mon, Mar 22, 2010
MENU