Skip to content

Commit

Permalink
Update 404.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Fiszh authored Sep 26, 2024
1 parent a82ca9e commit 78ccd54
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Redirecting...</title>
<script>
// Redirect to the index.html, preserving the URL path
window.location.replace('/test/' + window.location.pathname.substring(1));
const path = window.location.pathname;

// Check if the path already includes '/test/'
if (!path.startsWith('/test/')) {
// Redirect to the correct path only if it doesn't already include '/test/'
window.location.replace('/test' + path);
}
</script>
</head>
<body>
Expand Down

0 comments on commit 78ccd54

Please sign in to comment.