title: Redirect multiple domains to one domain (with or without www before)
body: <p>I have about 18 domains that need to be redirected to a new one. It has to work both with or without www prepended.</p>
  
  <p>I've tried this:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteEngine on 
      Rewritecond %{HTTP_HOST} !^www\.domain\.com
      RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>That gives me a redirect loop (and only works with www before, i think?).</p>