-
Notifications
You must be signed in to change notification settings - Fork 2
/
.htaccess
22 lines (18 loc) · 898 Bytes
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
RewriteEngine On
# Rewrite home to check for static
RewriteRule ^$ home
# Checks cache directory for already cached pages
RewriteCond %{REQUEST_URI} ^/[a-zA-Z0-9\-/]*$
RewriteCond %{DOCUMENT_ROOT}/refinery/cache/pages%{REQUEST_URI}.html -f
RewriteRule ^([^.]+)$ refinery/cache/pages/%{REQUEST_URI}.html [L]
# By default, Rails appends asset timestamps to all asset paths. This allows
# you to set a cache-expiration date for the asset far into the future
ExpiresActive on
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
# compress static text files
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css application/javascript