title: .htaccess 301 redirect specific URLs with a fallback
body: <p>I am migrating a domain.</p>
  
  <p>I have some URLs where I need to redirect them to a specific page, but everything else can be a blanket fallback. I need to maintain query strings as well.</p>
  
  <p>E.g.:</p>
  
  <p>Manual URLs:</p>
  
  <pre><code>http://example.com/i-am-manual-redirect   =&gt;    https://example2.com/this-is-not-the-same-URL
  http://example.com/i-am-manual-redirect2   =&gt;    https://example2.com/somewhere-else
  </code></pre>
  
  <p>Then the fallback for everything else:</p>
  
  <pre><code>http://example.com/same   =&gt;    https://example2.com/same
  http://example.com/blah   =&gt;    https://example2.com/blah
  </code></pre>
  
  <p>Currently have:</p>
  
  <pre><code># Manual Redirects
  RedirectMatch 301 ^/i-am-manual-redirect https://example2.com/this-is-not-the-same-URL
  RedirectMatch 301 ^/i-am-manual-redirect2 https://example2.com/somewhere-else
  
  # Fallback
  RewriteCond %{HTTP_HOST} ^example.com [NC]
  RewriteRule ^(.*)$ http://www.example2.com/$1 [L,R=301,NC]
  </code></pre>
  
  <p>But anytime I add the fallback, the manual redirects don't work.</p>