404页面返回200 ok
如果我直接在浏览器栏中输入 www.mydomain/error404.html ,它应该返回 404 响应还是 200 ok?
如果我输入 www.mydomain.co.uk/something-that-dosent-exist.html,它会返回 404 页面,其正确状态为 404,但是我的实际 404.html 页面应该返回 200ok 吗?
http://gsitecrawler.com/tools/Server-Status.aspx
域 http://www.novahealthy.co.uk
错误文档 error404.html
htaccess
AddType x-mapp-php4 .htm
#turn off the smart spelling matching feature.
CheckSpelling off
#set your real error document, which can be a php document.
ErrorDocument 404 /error404.html
主机是 1and1 共享主机
欢呼如有任何帮助,李
If i type www.mydomain/error404.html directly in to browser bar should it return a 404 responce or 200 ok?
if i type www.mydomain.co.uk/something-that-dosent-exist.html, it returns the 404 page with the correct status as 404, however should my actual 404.html page return 200ok??
http://gsitecrawler.com/tools/Server-Status.aspx
domain http://www.novahealthy.co.uk
error doc error404.html
htaccess
AddType x-mapp-php4 .htm
#turn off the smart spelling matching feature.
CheckSpelling off
#set your real error document, which can be a php document.
ErrorDocument 404 /error404.html
host is 1and1 shared hosting
cheers for any help lee
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,这是正确的。如果您要访问任何全球可访问的站点,并且您的浏览器成功获取该页面,您应该会返回 200 OK。
通常,您不会将错误页面保留在用户能够直接访问的位置。您通常会在内部重定向到服务器上的错误页面。
Yes, that's correct. If you're going to any world-accessible site and your browser successfully gets that page you should have 200 OK returned.
Typically you don't keep error pages in a place that a user is able to directly access. You usually internally redirect to an error page on the server.
我希望它返回 200。您的页面(即使它被命名为 404,并且被用作您的重定向 404 页面)存在,并且已正确找到并提供服务。
I would expect it to return a 200. Your page (even though it's named 404, and is being used as your redirect 404 page) exists, and it was found and served correctly.