DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Jeffrey has posted 20 posts at DZone. View Full User Profile

Redirect One Domain To Another Using Mod_rewrite

06.06.2008
| 25078 views |
  • submit to reddit
        
Options +FollowSymLinks 
RewriteEngine on

RewriteCond %{HTTP_HOST} ^www.old-domain.com$ [NC]
RewriteRule ^(.*)$ http://www.new-domain.com/$1 [R=301,L]