-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.htaccess
34 lines (27 loc) · 816 Bytes
/
.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
# -----------------
# custom error page
# -----------------
ErrorDocument 404 /404.html
# -------------
# cache-control
# -------------
# one week for css and js assets
<filesMatch "\.(css|js)$">
Header set Cache-Control "max-age=604800, public"
</filesMatch>
# two weeks for images
<filesMatch "\.(jpg|jpeg|png|gif|ico)$">
Header set Cache-Control "max-age=1209600, public"
</filesMatch>
# one month for fonts
<filesMatch "\.(ttf|svg|eot|woff|woff2)$">
Header set Cache-Control "max-age=2628000, public"
</filesMatch>
# one month for html
<filesMatch "\.(html)$">
Header set Cache-Control "max-age=2628000, public"
</filesMatch>
# never for archives or feeds (xml, json)
<filesMatch "\.(zip|tar|dmg|xml|json)$">
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate, public"
</filesMatch>