Skip to content

Instantly share code, notes, and snippets.

@noomz
Created June 23, 2013 14:41
Show Gist options
  • Save noomz/5845259 to your computer and use it in GitHub Desktop.
Save noomz/5845259 to your computer and use it in GitHub Desktop.
Force browser download any file in directory
SetEnvIf Request_URI "^.*/([^/]*)$" FILENAME=$1
Header set "Content-disposition" "attachment; filename=%{FILENAME}e"
UnsetEnv FILENAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment