Here's what I've used:
What this does is:
1. Turns on the URL rewriting engine in Apache
2. Sets the base URL to the root of the domain
3. Checks if the requested URL is not the new domain using case insensitive matching via the [NC] flag
4. Specifies the new URL to be the same as the requested URL, with the domain name changed to the new domain.
The L flag specifies this is the last rule to evaluate if a match is found and R=301 specifies that a HTTP 301 redirect is sent, which flags that the requested page has permanently moved to the new domain location.