-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
50 lines (44 loc) · 1.49 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
43
44
45
46
47
48
49
50
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>
# -- Password Protection --
# AuthName "Restricted Area"
# AuthType Basic
# AuthUserFile /Applications/MAMP/htdocs/.htpasswd
# AuthGroupFile /dev/null
# require valid-user
# -- Error Docs --
ErrorDocument 404 /404/
# -- 301 Redirects --
# Redirect 301 /oldlocation/oldlocation/ /newlocation/
# Redirect 301 /oldlocation/ /
# -- Browser Caching --
<IfModule mod_expires.c>
ExpiresActive On
# Default
ExpiresDefault "access plus 1 month"
# HTML
ExpiresByType text/html "access plus 10 minutes"
# CSS
ExpiresByType text/css "access plus 1 month"
# Webfonts
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
#JavaScript
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
# Other
ExpiresByType text/plain "access plus 1 months"
</IfModule>
# -- Compression --
SetOutputFilter DEFLATE