title: htaccess RewriteRule to new domain keeping query string
body: <p>I have found help regarding this in other questions and answers but they do not specifically address what I am trying to do.</p>
  
  <p>My RewriteRules look like this...</p>
  
  <pre><code>#Options +FollowSymLinks
  RewriteEngine on
  RewriteCond %{HTTP_HOST} ^www.domain.com$[OR]
  RewriteCond %{HTTP_HOST} ^domain.com$
  RewriteRule ^(.*)$ http://newdomain.com/rd/r.php? [QSA]
  </code></pre>
  
  <p>I need <a href="http://domain.com/query.php?sid=1234&amp;pub=123456&amp;c1=will&amp;c2=test1&amp;c3=12345" rel="nofollow">http://domain.com/query.php?sid=1234&amp;pub=123456&amp;c1=will&amp;c2=test1&amp;c3=12345</a> to redirect to <a href="http://newdomain.com/rd/r.php?sid=1234&amp;pub=123456&amp;c1=will&amp;c2=test1&amp;c3=12345" rel="nofollow">http://newdomain.com/rd/r.php?sid=1234&amp;pub=123456&amp;c1=will&amp;c2=test1&amp;c3=12345</a></p>
  
  <p>many thanks for any help. </p>