Skip to content

Commit

Permalink
docs: try redirect on 404 to current docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SteKoe committed Dec 13, 2024
1 parent a2a76bf commit 58935d4
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<title>Redirecting...</title>
<script type='text/javascript'>
function getRedirectUrl() {
const l = window.location;
if (l.pathname.includes("/current")) {
return l.protocol + "//" + l.hostname + (l.port ? ":" + l.port : "") +
[
"",
"3.4.1",
l.pathname.split("/").slice(2)
].join("/")
+
l.hash;
}
}

const redirectUrl = getRedirectUrl();
if (redirectUrl) {
window.location.replace(redirectUrl);
}
</script>
</head>
<body>
<p>Redirecting...</p>
</body>
</html>

0 comments on commit 58935d4

Please sign in to comment.