forked from johnsimons/docs.geteventstore.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
404.html
33 lines (28 loc) · 888 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
27
28
29
30
31
32
33
---
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);
var latestVersion = versions[section];
var redirectTo = "/";
if(latestVersion !== undefined && (currentLocation.indexOf("latest") !== -1)) {
redirectTo = currentHref.replace("latest", latestVersion);
if(!redirectTo.charAt(redirectTo.length - 1) !== '/')
redirectTo = redirectTo + "/";
}
window.location.assign(redirectTo);
</script>
</body>
</html>