-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a7718d
commit 8ed07d2
Showing
1 changed file
with
13 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Redirecting...</title> | ||
<script type="text/javascript"> | ||
// Script to redirect 404s to index.html | ||
var redirectTo = | ||
window.location.pathname.replace(/[^\/]+$/, "") + "index.html"; | ||
window.location.replace(redirectTo); | ||
// Redirect to index.html and append the current path | ||
const redirectUrl = | ||
"/?redirect=" + encodeURIComponent(window.location.pathname); | ||
window.location.replace(redirectUrl); | ||
</script> | ||
</head> | ||
<body></body> | ||
<body> | ||
<h1>Redirecting...</h1> | ||
<p> | ||
If you are not redirected, | ||
<a id="redirectLink" href="/">click here</a>. | ||
</p> | ||
</body> | ||
</html> |