Last active
December 19, 2015 04:19
-
-
Save robbestad/5896659 to your computer and use it in GitHub Desktop.
.htaccess stuff
This file contains 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
# Apache 1.3> | |
# Force download certain file types. | |
# REPLACES | |
# AddType application/octet-stream .doc .mov .avi .pdf .xls .mp4 | |
<FilesMatch "\.(docx?|txt|rtf|avi|mov|mp[34]|pdf|xls|jpe?g|tiff?)$"> | |
Header add Content-Disposition "attachment" | |
</FilesMatch> | |
# Speed things up | |
<ifModule mod_gzip.c> | |
mod_gzip_on Yes | |
mod_gzip_dechunk Yes | |
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ | |
mod_gzip_item_include handler ^cgi-script$ | |
mod_gzip_item_include mime ^text/.* | |
mod_gzip_item_include mime ^application/x-javascript.* | |
mod_gzip_item_exclude mime ^image/.* | |
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* | |
</ifModule> | |
# | |
# Let html files act as php files | |
# Not a great idea, but doable | |
AddType application/x-httpd-php .php .htm .html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment