Last active
August 29, 2015 14:15
-
-
Save kikmedia/b5a4a647b996a3edadb3 to your computer and use it in GitHub Desktop.
New .htaccess settings for Contao 2.11.x / Apache 2.4
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
## | |
# New Apache 2.4 syntax | |
## | |
# Prevent access to the Contao template files | |
## | |
<FilesMatch "\.(tpl|html5|xhtml)$"> | |
<IfModule !mod_authz_core.c> | |
Order deny,allow | |
Deny from all | |
</IfModule> | |
<IfModule mod_authz_core.c> | |
Require all denied | |
</IfModule> | |
</FilesMatch> | |
## | |
# Allow access from all domains for webfonts | |
# @see https://github.com/h5bp/html5-boilerplate | |
## | |
<IfModule mod_headers.c> | |
<FilesMatch "\.(ttf|ttc|otf|eot|woff2?|font\.css)$"> | |
Header set Access-Control-Allow-Origin "*" | |
</FilesMatch> | |
</IfModule> | |
(...) | |
## | |
# New Apache 2.4 syntax | |
## | |
# Gzip compression | |
# @see https://github.com/h5bp/html5-boilerplate | |
## | |
<IfModule mod_deflate.c> | |
<IfModule mod_filter.c> | |
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component | |
AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml | |
AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype | |
</IfModule> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment