note 25230 deleted from function.header by sniper
| From: | sniper@php.net | Date: | Sun, 07 Sep 2003 21:33:01 +0000 |
| Subject: | note 25230 deleted from function.header by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-55615@lists.php.net to get a copy of this message | ||
Note Submitter: php@silisoftware.com
----
If you have a bunch of MP3s (or other file types that would be undesirably opened by an application)
that you want to force to download rather than opening when clicked, you can simply create a
.htaccess file containing:
AddType application/mp3 mp3
Put the .htaccess file in the directory you're serving the MP3s from (or a parent directory).
"mp3" is the extension of the filetype whose behaviour you wish to modify, and
"application/mp3" could be substituted with "application/pdf" or
"application/octet-stream" or whatever.