Create Netlify-compatible 404.html that redirects to SPA 404 route
cgen-8aa14b92b0a346dfb989257deab2a03f
This commit is contained in:
parent
4db7246c51
commit
c911ddb284
1 changed files with 29 additions and 0 deletions
29
public/404.html
Normal file
29
public/404.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Page Not Found</title>
|
||||
<meta http-equiv="refresh" content="0; url=/404" />
|
||||
<style>
|
||||
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; background: #0b0b10; color: #e5e7eb; display:flex; align-items:center; justify-content:center; min-height:100vh; margin:0; }
|
||||
a { color: #7c3aed; }
|
||||
.wrap { text-align:center; padding: 2rem; }
|
||||
</style>
|
||||
<script>
|
||||
(function(){
|
||||
try {
|
||||
if (window && window.location) {
|
||||
window.location.replace('/404');
|
||||
}
|
||||
} catch(e) { /* noop */ }
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<h1>Page not found</h1>
|
||||
<p>Redirecting to the site 404 page… If you are not redirected, <a href="/404">click here</a>.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in a new issue