Redirect 301 / http://www.example.com/
Good to know information.
Addendum: With exclusions;
2008-03-29RewriteEngine On
RewriteCond %{HTTP_HOST} ^.*olddomain.com$ [NC]
RewriteCond %{REQUEST_URI} !^/foldername(/.*)?$ [NC]
RewriteCond %{REQUEST_URI} !^/filename.php
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]