Skip to content

Commit 1c19f2b

Browse files
committed
Update 404.html
1 parent 550de71 commit 1c19f2b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/static/404.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
<meta charset="utf-8">
55
<title>Greater Toronto Multiple Alarm Association</title>
66
<script>
7-
// ====================================================================================================================
8-
// This text is to simply ensure the 404.html file is larger than 512 bytes, otherwise Internet Explorer will ignore it.
9-
// Thank you Internet Exploder for requiring such a fantastic workaround in order to work properly
10-
// ====================================================================================================================
11-
sessionStorage.redirect = location.href;
7+
// Save the current path and redirect to the root
8+
if (location.pathname !== '/' && location.pathname !== '/index.html') {
9+
sessionStorage.redirect = location.pathname + location.search + location.hash;
10+
window.location.replace('/');
11+
}
1212
</script>
13-
<meta http-equiv="refresh" content="0;URL='/'">
1413
</head>
14+
<body>
15+
<h1>Redirecting...</h1>
16+
</body>
1517
</html>

0 commit comments

Comments
 (0)