title: 301 redirect entire domain to corresponding URL on new domain - EXCEPT for one directory
body: <p>As the title says, I am migrating a website from <code>olddomain.com</code> to <code>newdomain.com</code>.  I currently have an htaccess 301 redirect in place in the web root of <code>olddomain.com</code> as follows that redirects any request to <code>olddomain.com/any/url</code> to the same corresponding url on <code>newdomain.com</code>:</p>
  
  <pre><code>RewriteEngine On
  RewriteBase /
  RewriteCond %{HTTP_HOST} !newdomain.com$ [NC]
  RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]
  </code></pre>
  
  <p>My question is, how can I modify this rewrite rule to exclude ONE specific directory?  <code>olddomain.com/downloads</code> will continue to serve as a file mirror, so I need to exclude <code>olddomain.com/downloads</code> (and all its subdirectories such as <code>/releases</code>, etc) from the original site-wide 301 redirect such that any request to a URL on <code>olddomain.com</code> is redirected to the corresponding URL on <code>newdomain.com</code> with the exception of any request for a file or directory that lives inside <code>olddomain.com/download</code>.</p>
  
  <p><strong>EDIT</strong> As mentioned in the comments below, I also need to exclude <code>olddomain.com/getlatest.php</code> from the redirect, since it generates a download link that relies on parsing the server directory structure.</p>