如何制作一个合适的404页面?

Gee*_*Out 1 web-applications http http-status-code-404

我即将摆脱我的一个网站上的一些模板.这些模板下有很多页面

city.php?city_id=1
city.php?city_id=2
city.php?city_id=3
...
Run Code Online (Sandbox Code Playgroud)

告诉Google该页面不再存在的正确方法是什么,以便将该页面从索引中删除?

谢谢!

Fra*_*mas 5

如果您希望Google在不转发引用的情况下删除页面,则可以使用简单的HTTP 404.如果您希望Google将引用(例如页面排名等)转发到新页面,那么最好使用HTTP 301.

另请参阅:Google 301建议书.