forked from EventStore/eventstore.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
404.html
26 lines (26 loc) · 802 Bytes
/
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
---
permalink: /404.html
layout: null
---
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Redirecting…</title>
</head>
<body>
<script type="text/javascript">
var currentLocation = window.location.pathname.toLowerCase();
var currentHref = window.location.href.toLowerCase();
var parts = currentLocation.split("latest");
var versions = {{ site.latest_versions | jsonify }};
var section = parts[0].substring(1,parts[0].length - 1).replace("docs/","");
var latestVersion = versions[section];
var redirectTo = "/error";
if(latestVersion !== undefined && (currentLocation.indexOf("latest") !== -1)) {
redirectTo = currentHref.replace("latest", latestVersion);
}
window.location.assign(redirectTo);
</script>
</body>
</html>