Files
page-agent/packages/website/public/404.html
2026-02-27 19:46:44 +08:00

35 lines
726 B
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Redirecting...</title>
<script>
// SPA fallback for GitHub Pages
// Preserves the path so the SPA router can handle it after redirect
var seg = 1 // number of path segments to keep (repo name = /page-agent)
var loc = window.location
loc.replace(
loc.protocol +
'//' +
loc.hostname +
(loc.port ? ':' + loc.port : '') +
loc.pathname
.split('/')
.slice(0, 1 + seg)
.join('/') +
'/?p=' +
encodeURIComponent(
loc.pathname
.slice(1)
.split('/')
.slice(seg)
.join('/') +
loc.search +
loc.hash
)
)
</script>
</head>
<body></body>
</html>