.htaccess 976 B

1234567891011121314151617181920212223242526
  1. # To enable the Headers module, execute the following command and reload Apache:
  2. # sudo a2enmod headers
  3. # The following directives prevent the execution of script files
  4. # in the context of the website.
  5. # They also force the content-type application/octet-stream and
  6. # force browsers to display a download dialog for non-image files.
  7. SetHandler default-handler
  8. ForceType application/octet-stream
  9. Header set Content-Disposition attachment
  10. # The following unsets the forced type and Content-Disposition headers
  11. # for known image files:
  12. <FilesMatch "(?i)\.(gif|jpe?g|png)$">
  13. ForceType none
  14. Header unset Content-Disposition
  15. </FilesMatch>
  16. # The following directive prevents browsers from MIME-sniffing the content-type.
  17. # This is an important complement to the ForceType directive above:
  18. Header set X-Content-Type-Options nosniff
  19. # Uncomment the following lines to prevent unauthorized download of files:
  20. #AuthName "Authorization required"
  21. #AuthType Basic
  22. #require valid-user