Created
January 22, 2013 05:43
-
-
Save BronsonQuick/4592403 to your computer and use it in GitHub Desktop.
Force mp3's to download
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Add this to .htaccess | |
| <FilesMatch "\.(?i:mp3)$"> | |
| ForceType audio/mpeg | |
| SetEnvIf Request_URI "^.*/?([^/]*)$" FILENAME=$1 | |
| Header set Content-Disposition "attachment; filename=%{FILENAME}e" | |
| UnsetEnv FILENAME | |
| </FilesMatch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment