Re: .htaccess force download not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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, uhlar@xxxxxxxxxxx ; http://www.fantomas.sk/
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:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux