Skip to content

Commit

Permalink
error dinst
Browse files Browse the repository at this point in the history
  • Loading branch information
KatieLisabeth committed Sep 27, 2024
1 parent aee63de commit d7eb915
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dist/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Portfolio</title>
<title>Portfolio - Page Not Found</title>
</head>
<body>
<script>
// Handle GitHub Pages 404 by redirecting to index.html and preserving the path
;(function () {
var redirectTo = '/portfolio/' + location.pathname + location.search
location.replace(redirectTo)
// Only redirect if not already on the index.html
if (location.pathname !== '/portfolio/index.html') {
var redirectTo = '/portfolio/index.html' + location.search + location.hash
location.replace(redirectTo)
}
})()
</script>
</body>
Expand Down

0 comments on commit d7eb915

Please sign in to comment.