|
@@ -4,4 +4,43 @@ RewriteEngine On
|
4
|
4
|
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
|
5
|
5
|
RewriteRule ^ - [L]
|
6
|
6
|
# If the requested resource doesn't exist, use index.html
|
7
|
|
-RewriteRule ^ /index.html
|
|
7
|
+RewriteRule ^ /index.html
|
|
8
|
+
|
|
9
|
+<IfModule mod_headers.c>
|
|
10
|
+ <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
|
|
11
|
+ Header set Access-Control-Allow-Origin "*"
|
|
12
|
+ </FilesMatch>
|
|
13
|
+</IfModule>
|
|
14
|
+
|
|
15
|
+<IfModule mod_mime.c>
|
|
16
|
+ AddType application/x-javascript .js
|
|
17
|
+ AddType text/css .css
|
|
18
|
+ AddType font/eot .eot
|
|
19
|
+ AddType font/ttf .ttf
|
|
20
|
+ AddType font/woff .woff
|
|
21
|
+ AddType font/woff2 .woff2
|
|
22
|
+</IfModule>
|
|
23
|
+<IfModule mod_deflate.c>
|
|
24
|
+ AddOutputFilterByType DEFLATE font/eot font/ttf font/woff font/woff2 text/css application/x-javascript text/x-component text/html text/plain text/xml application/javascript
|
|
25
|
+ <IfModule mod_setenvif.c>
|
|
26
|
+ BrowserMatch ^Mozilla/4 gzip-only-text/html
|
|
27
|
+ BrowserMatch ^Mozilla/4.0[678] no-gzip
|
|
28
|
+ BrowserMatch bMSIE !no-gzip !gzip-only-text/html
|
|
29
|
+ </IfModule>
|
|
30
|
+</IfModule>
|
|
31
|
+
|
|
32
|
+<IfModule mod_headers.c>
|
|
33
|
+ RewriteCond "%{HTTP:Accept-encoding}" "gzip"
|
|
34
|
+ RewriteCond "%{REQUEST_FILENAME}\.gz" -s
|
|
35
|
+ RewriteRule "^(.*)\.css" "$1\.css\.gz" [QSA]
|
|
36
|
+ RewriteCond "%{HTTP:Accept-encoding}" "gzip"
|
|
37
|
+ RewriteCond "%{REQUEST_FILENAME}\.gz" -s
|
|
38
|
+ RewriteRule "^(.*)\.js" "$1\.js\.gz" [QSA]
|
|
39
|
+ RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1]
|
|
40
|
+ RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1]
|
|
41
|
+
|
|
42
|
+ <FilesMatch "(\.js\.gz|\.css\.gz)$">
|
|
43
|
+ Header append Content-Encoding gzip
|
|
44
|
+ Header append Vary Accept-Encoding
|
|
45
|
+ </FilesMatch>
|
|
46
|
+</IfModule>
|