Skip to content

Commit

Permalink
fix(error): fixed error 404
Browse files Browse the repository at this point in the history
  • Loading branch information
WillianLomeu committed Nov 8, 2023
1 parent 85ed4d7 commit c71e013
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions public/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,25 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<script type="text/javascript">
var pathSegmentsToKeep = 1;

var l = window.location;
l.replace(
l.protocol +
"//" +
l.hostname +
(l.port ? ":" + l.port : "") +
l.pathname
.split("/")
.slice(0, 1 + pathSegmentsToKeep)
.join("/") +
"/?/" +
l.pathname.slice(1).split("/").slice(pathSegmentsToKeep).join("/").replace(/&/g, "~and~") +
(l.search ? "&" + l.search.slice(1).replace(/&/g, "~and~") : "") +
l.hash
);
</script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down

0 comments on commit c71e013

Please sign in to comment.