-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
36 lines (33 loc) · 1.56 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Enable Expires headers
ExpiresActive On
ExpiresDefault "access plus 1 year"
# Expiration directives for different file types
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType text/html "access plus 1 year"
ExpiresByType application/x-httpd-php "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType video/mp4 "access plus 1 year"
ExpiresByType audio/mpeg "access plus 1 year"
ExpiresByType application/pdf "access plus 1 year"
ExpiresByType application/zip "access plus 1 year"
# Additional common file types
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType application/x-javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
ExpiresByType text/x-scss "access plus 1 year"
ExpiresByType application/json "access plus 1 year"
ExpiresByType font/woff "access plus 1 year"
ExpiresByType font/woff2 "access plus 1 year"
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
ExpiresByType application/font-sfnt "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType application/xml "access plus 1 year"
ExpiresByType text/xml "access plus 1 year"
ExpiresByType application/x-shockwave-flash "access plus 1 year"
# Cache control for Pages - 100/100
<FilesMatch "\.(php|ttf|otf|eot|woff|woff2|html|htm|xml)$">
Header always set Cache-Control "max-age=31536000, public, must-revalidate"
</FilesMatch>