How do you redirect URLs with a query string to another host?

This will redirect ALL requests from myhost.com to alt.myhost.com

RewriteCond %{HTTP_HOST} !^alt\.myhost\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/?(.*) http://alt.myhost.com/$1 [L,R,NE]

Code taken from official mod_rewrite manual

If for whatever reason the query string is not get preserved, replace the last line by

RewriteRule ^/?(.*) http://alt.myhost.com/$1 [L,R,NE,QSA]

UPDATE: This will redirect your specific URL to another domain:

RewriteCond %{HTTP_HOST} =myhost.com [NC]
RewriteCond %{QUERY_STRING} ^(p=1&preview=true)
RewriteRule ^$ http://alt.myhost.com/?%1 [R=301,L]

Because of the query string "p=([0-9]+)&preview=true" I guess your need for a redirect is due to having wordpress admin on a subdomain and the website on your main domain.

Because of that you can't preview drafts.

I came up with a broader solution that also works with custom post types and plugins that add parameters:

RewriteCond %{HTTP_HOST} =myhost.com [NC]
RewriteCond %{QUERY_STRING} (preview=true)
RewriteRule ^$ http://alt.myhost.com/?%{QUERY_STRING} [R=301,L]

In plain english when "preview=true" is found in a query, the redirection happen to the alt subdomain and the full query is kept.