-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path404.html
More file actions
22 lines (19 loc) · 763 Bytes
/
404.html
File metadata and controls
22 lines (19 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<!-- this custom 404 page instructs Github Pages to direct missing SPA links
back to the Vue Router -->
<html lang="en">
<head>
<script>
// baseURL below MUST reflect base folder of built site;
// example: '/simwrapper/' for https://vsp.berlin/simwrapper/
const baseURL = '/report-tncs2020-simwrapper/'
const numRedirects = Number.parseInt(localStorage?.numRedirects || '0') + 1
localStorage.numRedirects = numRedirects
localStorage[`redirect${numRedirects}`] = location.href
let meta = document.createElement('meta')
meta.httpEquiv = 'refresh'
meta.content = `0;URL='${baseURL}?redirect404=${numRedirects}'`
document.head.appendChild(meta)
</script>
</head>
</html>