-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path404.html
More file actions
33 lines (32 loc) · 1.14 KB
/
Copy path404.html
File metadata and controls
33 lines (32 loc) · 1.14 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page Not Found - Redirecting...</title>
<script>
// External URL redirects
const externalRedirects = {
'linkedin': 'https://linkedin.com/in/osinachiokpara',
'github': 'https://github.com/sin4ch',
'x': 'https://x.com/sin4ch',
'twitter': 'https://x.com/sin4ch',
'email': 'mailto:okparaosi17@gmail.com',
'resume': 'https://drive.google.com/file/d/1L5ceYqwEsZa2TuNwEsT65-IAWpmQLh8Y/view'
};
const validSections = ['home', 'about', 'projects', 'opensource', 'writing', 'talks', 'gallery', 'experience'];
const path = window.location.pathname.replace(/^\/|\/$/g, '').toLowerCase();
if (externalRedirects[path]) {
window.location.replace(externalRedirects[path]);
} else if (validSections.includes(path)) {
window.location.replace('/?section=' + encodeURIComponent(path));
} else {
// Redirect to home page for any unknown paths
window.location.replace('/');
}
</script>
</head>
<body>
<p>Redirecting...</p>
</body>
</html>