title: RedirectMatch and Regex Tomfoolery
body: <p>I'm trying to redirect all requests for /library/ to an external URL except when .pdf files are requested. e.g. www.mysite.com/library/section should redrect to www.externalsite.com but www.mysite.com/library/docs/some_pdf.pdf should serve up the PDF file without a redirect. Here's what I have: </p>
  
  <pre><code>RedirectMatch permanent /library/!(.*\.pdf) http://www.externalsite.com/
  </code></pre>