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
Featured Items Widget with jQuery
Viewed 1625 times since Sun, Dec 27, 2009
AeroSQL - Web Based MySQL Management
Viewed 1448 times since Wed, Feb 24, 2010
25 Graph & Chart Solutions For Web Developers
Viewed 34122 times since Mon, Feb 1, 2010
Flash Webcam Image Capture
Viewed 1960 times since Thu, Nov 12, 2009
UI Patterns - User Interface Design Pattern Library
Viewed 1486 times since Thu, Dec 31, 2009
jQuery Dropdown Check List
Viewed 1673 times since Thu, Jan 14, 2010
Protovis - Visualization for JavaScript via Canvas
Viewed 1228 times since Sun, Jan 3, 2010
Modify HTTP Headers in PHP with Examples
Viewed 1346 times since Wed, Mar 10, 2010
Create Interactive JavaScript Charts With Highcharts
Viewed 1542 times since Fri, Dec 4, 2009