This repository was archived by the owner on Feb 9, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.htaccess
More file actions
92 lines (77 loc) · 3.84 KB
/
.htaccess
File metadata and controls
92 lines (77 loc) · 3.84 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^release-notes/([0-9\.]+)$ /release-notes.php?version=$1
RewriteRule ^bundles/Nightingale/([0-9\.]+)/firstrun\.xml$ /bundles.php?version=$1
Options -Indexes
<IfModule mod_headers.c>
Header set Content-Security-Policy "frame-src 'none'; script-src 'self' 'unsafe-inline' http://*.getnightingale.com; connect-src http://*.getnightingale.com; style-src http://static.getnightingale.com chrome://songbird; default-src http://static.getnightingale.com"
</IfModule>
<IfModule mod_mime.c>
# JavaScript
# Normalize to standard type (it's sniffed in IE anyways)
# tools.ietf.org/html/rfc4329#section-7.2
AddType application/json json
AddType image/x-icon ico
</IfModule>
# ----------------------------------------------------------------------
# Gzip compression
# ----------------------------------------------------------------------
<IfModule mod_deflate.c>
# Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE application/atom+xml \
application/json \
application/rss+xml \
application/xhtml+xml \
application/xml \
text/css \
text/html \
text/plain \
</IfModule>
# ----------------------------------------------------------------------
# Expires headers (for better cache control)
# ----------------------------------------------------------------------
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType text/cache-manifest "access plus 0 seconds"
ExpiresByType text/html "access plus 0 seconds"
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/rss+xml "access plus 1 hour"
ExpiresByType application/atom+xml "access plus 1 hour"
ExpiresByType image/x-icon "access plus 2592000 seconds"
</IfModule>
# ----------------------------------------------------------------------
# ETag removal
# ----------------------------------------------------------------------
# FileETag None is not enough for every server.
<IfModule mod_headers.c>
Header unset ETag
</IfModule>
# Since we're sending far-future expires, we don't need ETags for static content.
# developer.yahoo.com/performance/rules.html#etags
FileETag None
# ----------------------------------------------------------------------
# A little more security
# ----------------------------------------------------------------------
# Prevent access to template files
<FilesMatch "\.(tpl|html5|xhtml)$">
Order allow,deny
Deny from all
</FilesMatch>
# ----------------------------------------------------------------------
# Custom Errors
# ----------------------------------------------------------------------
ErrorDocument 500 http://getnightingale.com/500
ErrorDocument 400 http://getnightingale.com/400
ErrorDocument 401 http://getnightingale.com/401
ErrorDocument 403 http://getnightingale.com/403
ErrorDocument 404 http://getnightingale.com/404
ErrorDocument 410 http://getnightingale.com/410