title: .htaccess to allow only pdf files in a subdirectory
body: <p>I am trying to write an <code>.htaccess</code> file to only allow access to pdf files in a subdirectory. I'm going to deploy the file on a host that I don't control, so I can't make changes to the apache configuration. </p>
  
  <p>I want to only allow access to .pdf files in the <code>Foo</code> directory. I have attempted:</p>
  
  <pre><code>Deny From All
  
  &lt;FilesMatch ".+\/Foo\/.+\.pdf$"&gt;
  Allow From All
  &lt;/FilesMatch&gt;
  </code></pre>
  
  <p>However, when I attempt to access <code>example.com/bar/Foo/baz.pdf</code>, I am given an HTTP 403 Forbidden response.</p>
  
  <p>How can I deny access to everything, except for pdf files in one particular directory?</p>
  
  <p>Thanks</p>