-
Notifications
You must be signed in to change notification settings - Fork 16
/
404.html.in
59 lines (44 loc) · 1.72 KB
/
404.html.in
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<html>
<body>
<script src="/js/route.js"></script>
<script>
/* Do stuff I'd normally do in .htaccess with mod_rewrite. */
var route = new Route();
route.add("/issues/:number", function(number) {
route.redirect("https://logstash.jira.com/browse/LOGSTASH-" + number);
});
route.add("/code", function() {
route.redirect("https://github.com/logstash/logstash");
});
route.add("/code/:repo", function() {
route.redirect("https://github.com/logstash/" + repo);
});
route.add("/commit/:commit", function(commit) {
route.redirect("https://github.com/logstash/logstash/commit/" + commit);
});
route.add("/issues/?", function() {
route.redirect("https://logstash.jira.com/");
});
route.add("/docs/1.0/?", function() {
route.redirect("/docs/latest/");
});
route.add("/docs/latest($|/$|/.*$)", function(path) {
route.redirect("/docs/%VERSION%" + path);
});
route.add("/docs/[^/]+/tutorials/getting-started-(simple|centralized)", function() {
route.redirect("/docs/latest/tutorials/getting-started-with-logstash");
});
route.add(".*", function() {
// Actually, 404.
document.getElementById("four-oh-four").setAttribute("style", "display: block");
});
route.run();
</script>
<div id="four-oh-four">
<h1> Oops! </h1>
Sorry, this page doesn't exist.
<p>
<a href="https://www.elastic.co/products/logstash">Go to the Logstash product page</a> - or maybe you want <a href="https://www.elastic.co/guide/en/logstash/current/index.html">the docs for the latest logstash?</a>
</div>
</body>
</html>