-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Page not found</title> | ||
<script> | ||
// 解析当前 URL 的路径部分 | ||
var path = location.pathname; | ||
|
||
// 重定向到首页,并通过 hash 将原路径传递给首页 | ||
// 这里假设你的首页能够使用 JavaScript 读取 hash,并据此渲染对应的组件或页面 | ||
document.location.href = '/#' + path; | ||
</script> | ||
</head> | ||
<body> | ||
<h1>Page Not Found</h1> | ||
<p>Redirecting to homepage...</p> | ||
</body> | ||
</html> |