-
Notifications
You must be signed in to change notification settings - Fork 114
Expand file tree
/
Copy path404.html
More file actions
37 lines (37 loc) · 1.07 KB
/
404.html
File metadata and controls
37 lines (37 loc) · 1.07 KB
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
<!doctype html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/png" href="/images/favicon-96x96.png" sizes="96x96" />
<title>Redirection…</title>
<meta
http-equiv="refresh"
content="0; url=/" />
<script>
;(function () {
try {
var l = window.location
var path = l.pathname.replace(/^\//, "").replace(/\/$/, "")
var slug = path.split("/").filter(Boolean).pop() || ""
var base = "/"
var target = base
if (slug && !slug.endsWith(".html")) {
target += "?element=" + encodeURIComponent(slug)
}
if (l.search && !/\bslug=/.test(l.search)) {
target += (target.includes("?") ? "&" : "?") + l.search.slice(1)
}
l.replace(target)
} catch (e) {
/* ignore, meta refresh fallback */
}
})()
</script>
</head>
<body>
<p>Redirection vers le styleguide…</p>
</body>
</html>