How to send Content-Disposition headers in apache for ALL files?

Posted by user37900 on Server Fault See other posts from Server Fault or by user37900
Published on 2010-03-16T18:49:55Z Indexed on 2010/03/16 18:51 UTC
Read the original article Hit count: 165

I have seen similar questions, but the answers currently posted do not work for me.

I am trying to get all files to prompt user to download but .html and .jpg files are still being displayed.

here is what I have in my httpd.conf

<Location /testfiles>
    SetEnvIf Request_URI "^.*/([^/]*)$" FILENAME=$1
    Header set "Content-disposition" "attachment; filename=%{FILENAME}e"
    UnsetEnv FILENAME
</Location>

What am i doing wrong ?

Many thanks

© Server Fault or respective owner

Related posts about apache2

Related posts about content-disposition