I happened to have the occasion to move a web site today. We moved MarketingFix.com from one server to another, but we didn’t move the DNS yet (because we hadn’t set up email and all of the internal lists we’re still running @marketingfix.com) so, we had to figure out how to send traffic coming to http://www.marketingfix.com/* to http://www.up2speed.com/* (and keep the pages the same).
One of the team members, Olivier, found this code:
RewriteRule ^(.*)$ http://www.up2speed.com/$1 [R=301,L]