title: htaccess rewrite rule to external domain if query is with www
body: <pre><code>www.example.com
  </code></pre>
  
  <p>to</p>
  
  <pre><code>anotherdomain.com
  </code></pre>
  
  <p>Calls to example.com (without <strong>www.</strong>) should NOT be affected on this.
  Normally this would be easy, but the special thing about this is that I want to execute the same script on a bunch of domains, so I can't put the specific domain-name inside the rewrite-rule.</p>
  
  <p>Do you have any ideas how to do this?</p>
  
  <p>Thanks!</p>