How do I redirect only the root page to another subdomain via htaccess?

view story

http://serverfault.com – I am trying to redirect only my top level domain eg. domain.com to sub.domain.com. The inner pages of the domain should not be redirected. I followed the following link: How to redirect root and only root via htaccess? But when doing a search on my site, the query was appended to the sub domain like: sub.domain.com/?q=product where it should have been domain.com/?q=product My current htaccess already has to following that has rewritten: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !\.(png|gif|ico|swf|jpe?g|js|css)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !- (HowTos)