title: Forcing a download using <filesMatch> in htaccess
body: <p>I'm trying to force the download of all files of one folder.</p>
  
  <p>The link on the page looks like this</p>
  
  <pre><code>&lt;a href="http://example.com/uploads/documents/file.pdf"&gt;Click to download&lt;/a&gt;
  </code></pre>
  
  <p>And I have this snippet in my .htaccess</p>
  
  <pre><code>&lt;filesMatch ".*uploads/documents.*"&gt;
      ForceType application/octet-stream
      Header set Content-Disposition attachment
  &lt;/filesMatch&gt;
  </code></pre>
  
  <p>I already know that the 2 lines inside the tag works, because it works when I put a .htaccess directly inside the folder where I want to force the download with the following code:</p>
  
  <pre><code>&lt;Files *.*&gt;
      ForceType application/octet-stream
      Header set Content-Disposition attachment
  &lt;/Files&gt;
  </code></pre>
  
  <p>There seems to be something which I don't understand about the filesMatch tag.</p>