-
-
Notifications
You must be signed in to change notification settings - Fork 165
Expand file tree
/
Copy path.htaccess
More file actions
22 lines (19 loc) · 660 Bytes
/
.htaccess
File metadata and controls
22 lines (19 loc) · 660 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
RewriteRule ^ /index.html [L]
# Prevent caching of service worker file
<FilesMatch "sw\.js$">
<IfModule mod_headers.c>
Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</IfModule>
</FilesMatch>
# Cache index.html with short expiration to allow updates
<FilesMatch "index\.html$">
<IfModule mod_headers.c>
Header set Cache-Control "public, max-age=300, must-revalidate"
</IfModule>
</FilesMatch>