title: Parked Domain Wildcard 301 Redirects
body: <p>I've got a series of domains parked on an account on a LAMP server with mod_rewrite available for duty. I'd like to achieve the following:</p>
  
  <p>I'm looking for domain1.com to be the "master" - the idea is that the following redirects should be in place (with 301 statuses for maximum SEO benefit):</p>
  
  <blockquote>
    <p>domain2.com redirects to domain1.com<br>
    domain3.com redirects to domain1.com<br>
    domain2.com/foo/ redirects to
    domain1.com/foo/   domain3.com/foo/
    redirects to domain1.com/foo/<br>
    domain2.com/foo/bar/ redirects to
    domain1.com/foo/bar/<br>
    domain3.com/foo/bar/ redirects to
    domain1.com/foo/bar/</p>
  </blockquote>
  
  <p>And so on...</p>
  
  <p>Effectively, I'd like to implement some kind of wildcard in the mix so that subpages of /foo/ and /bar/ are also redirected to the same URLs on domain1.com</p>
  
  <p>I've been hunting high and low for the relevant .htaccess documentation, but can't seem to find the solution I am looking for. I was therefore wondering if any of you might have some pointers - would be very much appreciated :)</p>