title: RedirectCond Help for subdomains for www and www2
body: <p>We have 2 subdomains <code>www.mydomain.com</code> and <code>www2.mydomain.com</code>. I'm trying to redirect pages to new site as below:</p>
  <ul>
  <li><code>www.mydomain.com/support to newdomain.com/site1/page1.html</code></li>
  <li><code>www2.mydomain.com/support to newdomain.com/site2/page2.html</code></li>
  </ul>
  <p>I've set the redirect rule in <code>httpd.conf</code> as below:</p>
  <blockquote>
  <p>RewriteCond %{HTTP_HOST} (www.)?mydomain.com</p>
  <p>RewriteCond %{HTTP_HOST}   !^$</p>
  <p>RewriteRule ^/support/?$ <a href="http://newdomain.com/site1/page1.html" rel="nofollow noreferrer">http://newdomain.com/site1/page1.html</a> [R=301,NC,L]</p>
  <p>RewriteCond %{HTTP_HOST} (www2.)?mydomain.com</p>
  <p>RewriteCond %{HTTP_HOST}   !^$</p>
  <p>RewriteRule ^/support/?$ <a href="http://newdomain.com/site2/page2.html" rel="nofollow noreferrer">http://newdomain.com/site2/page2.html</a> [R=301,NC,L]</p>
  </blockquote>
  <p>The first redirect rule is working fine, but not the other. In above case, both <code>www</code> and <code>www2.mydomain.com/support</code> are going to <code>newdomain.com/site1/page1.html</code></p>
  <p>Any help is appreciated!</p>