Automatic mp3 download

Permalink
Hi,

I have a password protected download page on my site, and every week it will have an mp3 file and a pdf file to be downloaded by my students.
pdf files download automatically to the download folder, but mp3s are opened in another browser tab.

How can I make mp3 files begin downloading automatically, or at least enable them to be downloaded?

Thanks..

 
mesuva replied on at Permalink Reply
mesuva
This is something you should be able to configure via your .htaccess file.

From a quick google, the following seems to be what you'd need to add:
<FilesMatch "\.(?i:mp3)$">
  ForceType application/octet-stream
  Header set Content-Disposition attachment
</FilesMatch>


There's probably a couple of ways to do this in an .htaccess file, if the above doesn't work you may need to search for some alternatives. I just googled 'force mp3 download htaccess'