Skip to content

Commit

Permalink
[CI] Fixing redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
louiiuol committed Oct 20, 2024
1 parent dc8546b commit c08e0ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
1 change: 1 addition & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
}
],
"baseHref": "/ngx-lib/",
"deployUrl": "/ngx-lib/",
"outputHashing": "all"
},
"development": {
Expand Down
11 changes: 3 additions & 8 deletions src/assets/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@
<html lang="en">
<head>
<title>ngx lib - Not Found - Redirecting</title>
<meta http-equiv="refresh" content="0; URL='/ngx-lib/'" />
<meta http-equiv="refresh" content="0; URL='./index.html'" />
<script type="text/javascript">
// Check if the current path isn't the root ("/ngx-lib/")
if (window.location.pathname !== "/ngx-lib/") {
// Redirect the user back to the index page while preserving the original route
window.location.replace(
"/ngx-lib/" + window.location.pathname.substring(1),
);
}
console.log(window.location.pathname);
window.location.href = "./index.html" + window.location.pathname;
</script>
</head>
<body></body>
Expand Down

0 comments on commit c08e0ac

Please sign in to comment.