-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
46 lines (40 loc) · 1.29 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
42
43
44
45
46
<FilesMatch "\.(htaccess|htpasswd|ini|log|sh|inc|bak|tpl)$">
Order Allow,Deny
Deny from all
</FilesMatch>
Options -Indexes
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|xhtml|css|js|json)$
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_include mime ^text/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_include handler ^cgi-script$
</IfModule>
<IfModule mod_deflate.c>
<FilesMatch "\.(x?html|css|js|svg|json|xml|eot|woff2?|ttf|otf)$">
SetOutputFilter DEFLATE
# For Older Browsers Which Can't Handle Compression
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</FilesMatch>
</IfModule>
<FilesMatch "\.(x?html|css|js|json|php)$">
AddDefaultCharset UTF-8
</FilesMatch>
<IfModule mod_headers.c>
<FilesMatch "\.(x?html|css|js|png|jpe?g|svg|json|xml|gif|swf|eot|woff2?|ttf|otf|pdf)$">
Header set Cache-Control "public, max-age=31536000"
</FilesMatch>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>