forked from logstash/logstash.net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
404.html.in
54 lines (41 loc) · 1.37 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
<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(".*", 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="/">Go back to logstash.net</a>
</div>
</body>
</html>