forked from cs10/bjc-r
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
executable file
·41 lines (35 loc) · 1.57 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
# Basic CORS Header to allow serving images / files
Header set Access-Control-Allow-Origin *
# Compression of Files
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE application/x-httpd-eruby
SetOutputFilter DEFLATE
# Proxies should not alter user agent string
Header set Vary User-Agent env=!dont-vary
# Don't try to gzip or proxy these file types.
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:pdf|avi|mov|mp3|mp4|rm)$ no-gzip dont-vary
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# TODO: Put this in <if> condition.
# CacheDefaultExpire is a standard module.
# Otherwise use in the meantime... <IfModule mod_expires.c></IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 10 weeks"
ExpiresByType text/html "access plus 10 days"
ExpiresByType text/css "access plus 10 days"
ExpiresByType application/javascript "access plus 10 days"
</IfModule>