Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a few servers for storing files and I have this in my .htaccess to force download of mp3 files (instead of the browser streaming it). However, on one file server this does not work. Mod_headers is installed on every server which I verified using -M to list apache modules. Why would this happen?

<IfModule mod_headers.c>
Header unset Content-Type
Header unset Content-Disposition
Header set Content-Disposition attachment
Header set Content-Type application/octet-stream
Header add Content-Type application/force-download
Header add Content-Type application/download
Header unset Content-Transfer-Encoding
Header set Content-Transfer-Encoding binary
</IfModule>
share|improve this question
1  
Please paste the output of HTTP headers from that misbehaving server. Just try to wget an MP3 there or so. –  Janne Pikkarainen Jul 22 '11 at 9:39
    
How can I do that? I'm not really that familiar with servers sorry –  Matthew Hui Jul 22 '11 at 15:27
    
Just use command wget yoururl –  Janne Pikkarainen Jul 22 '11 at 20:43
    
I have the above code in .htaccess how would this work? –  Matthew Hui Jul 22 '11 at 20:56
    
Essentially do a command like: wget --server-response --spider http://misbehaving.server/the/file.mp3 or curl -I http://misbehaving.server/the/file.mp3. Based on that, we'll get a bit more information about what's going on. –  fission Jul 24 '11 at 10:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.