If you want to redirect your Error 404 page, then make a file called "404.html". And paste the code:
<meta http-equiv="refresh" content="0;url=https://new-page-url.com"/>
EDIT:
- If you want to redirect your Error 404 page to your home page, then paste this code:
<meta http-equiv="refresh" content="0;url=/">
Advantages:
i. One line code.
ii. You can delay the timing of redirection according to your need by replacing the 0
from the code.
- And the second one to redirect (used by you,I have excluded the above code) :
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<script type="text/javascript">
window.location.href = "https://zigecek.github.io/error"
</script>
<title>Page Redirection</title>
</head>
<body>
If you are not redirected automatically, follow <a href='https://zigecek.github.io/'>this</a>.
</body>
</html>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…