diff --git a/.htaccess b/.htaccess index 55e518c..23dedb4 100644 --- a/.htaccess +++ b/.htaccess @@ -55,3 +55,41 @@ AddOutputFilterByType DEFLATE application/json AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript + + +## Custom htaccess + + +# block update scripts +RewriteRule ^(.*).sh$ error [R=301,L] + +# block git repo +RewriteRule ^.git/(.*) error [R=301,L] +RewriteRule ^.gitattributes error [R=301,L] +RewriteRule ^.gitignore error [R=301,L] +RewriteRule ^.gitmodules error [R=301,L] + + +# enable browser caching headers +AddType image/svg+xml .svg +AddType application/vnd.ms-fontobject .eot +AddType application/x-font-opentype .otf +AddType application/x-font-ttf .ttf +AddType application/font-woff .woff + + ExpiresActive On + ExpiresDefault "access plus 1 seconds" + ExpiresByType text/html "access plus 1 hour" + ExpiresByType text/xml "access plus 1 hour" + ExpiresByType text/css "access plus 1 month" + ExpiresByType image/gif "access plus 1 year" + ExpiresByType image/jpeg "access plus 1 year" + ExpiresByType image/png "access plus 1 year" + ExpiresByType image/svg+xml "access plus 1 year" + ExpiresByType text/javascript "access plus 1 month" + ExpiresByType application/javascript "access plus 1 month" + ExpiresByType application/vnd.ms-fontobject "access plus 1 year" + ExpiresByType application/x-font-opentype "access plus 1 year" + ExpiresByType application/x-font-ttf "access plus 1 year" + ExpiresByType application/font-woff "access plus 1 year" +