404 Not Found

描述

这个网站是一个示例网站,用于演示如何处理404错误。当用户访问不存在的页面时,将显示此页面。

代码

<!DOCTYPE html>  
<html lang="en">  
<head>  
<meta charset="UTF-8">  
<meta name="viewport" content="width=device-width, initial-scale=1.0">  
<title>404 Not Found</title>  
</head>  
<body>  
<h1>404 Not Found</h1>  
<p>Sorry, the page you are looking for does not exist.</p>  
</body>  
</html>  

使用方法

将上述代码保存为一个名为404.html的文件,然后将其放在网站的根目录下(通常是public_htmlwww文件夹)。当用户尝试访问不存在的页面时,他们将看到这个自定义的404页面。