-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simple redirect solution with custom 404.html (#53)
- Loading branch information
1 parent
84c84d4
commit bcd1c49
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>404 Page Not Found</title> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
text-align: center; | ||
padding: 50px; | ||
} | ||
h1 { | ||
font-size: 36px; | ||
margin-bottom: 20px; | ||
} | ||
p { | ||
font-size: 18px; | ||
margin-bottom: 20px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>Page Not Found</h1> | ||
<p>The page you are looking for could not be found, <a href="/">you check the docs index here</a>.</p> | ||
<script> | ||
// Define the list of old paths and target paths | ||
var paths = [ | ||
{ oldPath: '/waas/intro/', targetPath: '/solutions/wallets/embedded-wallet/overview/' }, | ||
|
||
]; | ||
|
||
var currentPath = window.location.pathname; | ||
|
||
for (var i = 0; i < paths.length; i++) { | ||
if (paths[i].oldPath === currentPath) { | ||
window.location.href = paths[i].targetPath; | ||
break; | ||
} | ||
} | ||
</script> | ||
</body> | ||
</html> |