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
Which hosting plans support IIS Mod-Rewrite?
Viewed 2610 times since Sat, Oct 10, 2009
Create Glowing, Radioactive Buttons with CSS
Viewed 821 times since Sun, Dec 27, 2009
How do I setup and use SSH?
Viewed 1254 times since Thu, Oct 15, 2009
Stylish Cross-Browser CSS Buttons - Simply-Buttons v2
Viewed 875 times since Thu, Nov 12, 2009
Quick Tables for Showing & Updating DB Data
Viewed 900 times since Sun, Dec 27, 2009
Axiis - Open Source Data Visualization Framework
Viewed 1065 times since Thu, Jan 7, 2010
JavaScript Tree Menu Component - jsTree Menu
Viewed 1370 times since Sat, Jan 9, 2010
Plupload - Multiple Files Upload Script
Viewed 1091 times since Tue, Feb 9, 2010
PHP Questions for Interview with Answers
Viewed 1087 times since Wed, Feb 24, 2010
Google Maps jQuery Plugin
Viewed 846 times since Thu, Jan 7, 2010
MENU