-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path404.html
More file actions
32 lines (24 loc) · 929 Bytes
/
404.html
File metadata and controls
32 lines (24 loc) · 929 Bytes
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
<!doctype html>
<html>
<head>
<title>Home</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<link rel="icon" href="data:,">
</head>
<body>
<script>
// split path locations (/../../)
const paths = window.location.pathname.split('/').filter(Boolean);
// use last location as hash parameter (#path)
paths[paths.length - 1] = `#${paths[paths.length - 1]}`;
// redirect to root page with hash parameter (index.html)
window.location.replace(`${window.location.origin}/${paths.join('/')}`);
</script>
</body>
</html>