Like @gumbo, put the .htaccess file in the highest level folder you want to influence. and these settings will flock to subfolders. You can also make sure the headers module is enabled before using it in your htaccess file. The following line generates an error if the header module is not enabled:
Header set Content-Disposition attachment
Here is an example that forces you to download mp3 files only if the header module is enabled:
<IfModule mod_headers.c> <FilesMatch "\.(mp3|MP3)$"> ForceType audio/mpeg Header set Content-Disposition "attachment" Allow from all </FilesMatch> </IfModule>
Note: it does not include the module, it simply ignores anything inside the IfModule tags if the module is not included.
To enable apache modules, you will need to either edit the httpd.conf file or on the Wamp server, you can click the icon and select "Apache β Apache Modules β headers_module" or make sure it is installed.
TxRegex Jan 28 '13 at 21:26 2013-01-28 21:26
source share