httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matus UHLAR - fantomas <>
Subject Re: [users@httpd] .htaccess force download not working
Date Fri, 15 May 2009 08:33:21 GMT
On 15.05.09 12:21, J. Bakshi wrote:
> I like to force download the pdf and mp3 files from a site. To achieve
> this I have added the line in .htaccess
> AddType application/octet-stream .pdf
> AddType application/octet-stream .mp3
> But it is not working with IE7, opera-9 but sometime firefox honor the
> setting.
> How can I make all browser to honor the setting through .htaccess setting ?

You can not. It's up to the browser what does it do with content it fetched.
Apparently IE7 does file type autodetection (IE is known to do that) and
does whatever it wants.

You could however try "Content-Disposition: attachment" header to hint the
browser how the file should be handled.

Matus UHLAR - fantomas, ;
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
"Two words: Windows survives." - Craig Mundie, Microsoft senior strategist
"So does syphillis. Good thing we have penicillin." - Matthew Alton

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message