Set Content-Disposition header to attachment only on files in a certain directory?

.htaccess, apache, header

Solution

You will probably need to put the directives in the `.htaccess` file in the particular directory.

Problem

I've got this this rule in my htaccess file to force linked files to download rather than open in the browser: ``` <FilesMatch "\.(gif|jpe?g|png)$"> ForceType application/octet-stream Header set Content-Disposition attachment </FilesMatch> ``` Is there a way to alter the `RegExp` so it only applies to files in a certain directory? Thanks

Original source