Skip to content

Commit 95b1e84

Browse files
committed
redirect via 404
1 parent ba3ce17 commit 95b1e84

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

404.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ <h1>404</h1>
8686
</div>
8787
</body>
8888
<script>
89-
console.log("404: Not Found");
89+
// if there is a trailing slash in the url then remove it and redirect
90+
if (window.location.pathname.endsWith('/')) {
91+
window.location.replace(window.location.pathname.slice(0, -1));
92+
}
9093
</script>
9194
</html>

0 commit comments

Comments
 (0)