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 ^(.*)$$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.
There are no comments for this article. Be the first to post a comment.
Security Code Security Code
Related Articles RSS Feed
5 Best Online Diagram Designing Tools
Viewed 9276 times since Sat, Jan 30, 2010
13 Useful Javascript Syntax Highlighting Scripts
Viewed 1334 times since Mon, Jan 4, 2010
Free IP to Country, IP to City Database & API
Viewed 1321 times since Thu, Dec 31, 2009
How to prevent access to a specific file on server using htaccess?
Viewed 1002 times since Sun, Mar 14, 2010
jqPlot - jQuery Charts & Plotting Plugin
Viewed 1335 times since Sat, Jan 9, 2010
Facebook Style Chat Script - ArrowChat
Viewed 1061 times since Tue, Aug 3, 2010
Plupload - Multiple Files Upload Script
Viewed 1297 times since Tue, Feb 9, 2010
New Tags Introduced in HTML5
Viewed 1286 times since Sat, Apr 3, 2010
Modify HTTP Headers in PHP with Examples
Viewed 1051 times since Wed, Mar 10, 2010
Free Under Construction Coming Soon Template
Viewed 1878 times since Sat, Mar 12, 2011