-
Notifications
You must be signed in to change notification settings - Fork 2
/
404.html
31 lines (28 loc) · 1.4 KB
/
404.html
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
<head>
<meta http-equiv="refresh" content="5; URL=https://community.sap.com/topics/open-source" />
<script>
// Redirect for sap.github.io/chevrotin to the dedicated chevrotin.io pages
if (window.location.href.startsWith("https://sap.github.io/chevrotin")) {
pathname = window.location.pathname
// custom path mappings
// sap.github.io/chevrotin/performance -> chevrotain.io/performance
// sap.github.io/chevrotin/playground -> chevrotain.io/playground
// sap.github.io/chevrotin/docs -> chevrotain.io/docs
// * -> /
if (window.location.href.startsWith("https://sap.github.io/chevrotin/performance")) {
pathname = pathname.replace("chevrotin/performance", "performance")
} else if (window.location.href.startsWith("https://sap.github.io/chevrotin/playground")) {
pathname = pathname.replace("chevrotin/playground", "playground")
} else if (window.location.href.startsWith("https://sap.github.io/chevrotin/docs")) {
pathname = pathname.replace("chevrotin/docs", "docs")
} else {
pathname = "/"
}
window.location.replace("https://chevrotain.io" + pathname + window.location.search);
}
</script>
</head>
<body>
<p>If you are not redirected in five seconds, please navigate manually to <a
href="https://community.sap.com/topics/open-source">https://community.sap.com/topics/open-source</a>.</p>
</body>