-
Notifications
You must be signed in to change notification settings - Fork 4
/
.htaccess
42 lines (30 loc) · 1.04 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
37
38
39
40
41
42
# Use UTF-8 encoding for anything served as `text/html` or `text/plain`.
AddDefaultCharset utf-8
<IfModule mod_mime.c>
# Force UTF-8 for certain file formats.
AddCharset utf-8 .css .js .json
AddType text/html .html
AddType text/css .css
AddType image/svg+xml .svg .svgz
AddType image/png .png
# JavaScript
AddType application/javascript .js
AddType application/json .json
</IfModule>
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 month"
# cache.appcache needs re-requests in FF 3.6 (thx Remy ~Introducing HTML5)
ExpiresByType text/cache-manifest "access plus 0 seconds"
# your document html
ExpiresByType text/html "access plus 0 seconds"
# media
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
# favicon (cannot be renamed)
ExpiresByType image/x-icon "access plus 1 week"
</IfModule>