-
Notifications
You must be signed in to change notification settings - Fork 7
/
.htaccess
32 lines (31 loc) · 1.15 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
# cache css, fonts and js
<filesMatch ".(js|css|ico|woff2|png)$">
Header set Cache-Control "max-age=31536000, public"
</filesMatch>
# compress text files
<IfModule mod_mime.c>
AddType application/x-javascript .js
AddType text/javascript .js .mjs
AddType text/css .css
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css text/javascript application/x-javascript text/x-component text/html text/plain text/xml application/javascript
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
</IfModule>
</IfModule>
Header append Vary User-Agent env=!dont-vary
# Allow Parcel to put files in /dist
RewriteEngine on
# use the dist version of the entry code
# but not if they are already linked to that directory
RewriteCond %{REQUEST_URI} !/dist/ [NC]
RewriteCond %{REQUEST_URI} !/experiments/ [NC]
RewriteCond %{REQUEST_URI} !/public/ [NC]
RewriteCond %{REQUEST_URI} !/acme-challenge/ [NC]
RewriteCond %{REQUEST_URI} !/doc/ [NC]
RewriteCond %{REQUEST_URI} !/vr/ [NC]
RewriteCond %{REQUEST_URI} !norton [NC]
RewriteRule "^(.*)$" "dist/$1" [PT]