Created
May 6, 2014 15:38
-
-
Save nitriques/97c211729a50b2c126b0 to your computer and use it in GitHub Desktop.
Force download on Apache 2.2
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
RewriteCond %{REQUEST_FILENAME} -f | |
RewriteCond %{QUERY_STRING} dl | |
RewriteRule ^.*\.(png|jpe?g|gif|pdf|rtf|txt|docx) - [T=applicaton/octet-stream,E=DOWNLOAD:true,L] | |
Header set Content-Disposition attachment env=DOWNLOAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment