暂时不可用页面的HTTP状态代码 [英] HTTP status code for temporarily unavailable pages

查看:116
本文介绍了暂时不可用页面的HTTP状态代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在重新设计我的小型企业网站。我将建立一个暂时正在建设中的启动页面。我知道,我知道......但我希望它会成为一种风格。 :)

I'm redesigning my small business' website. I will be putting up a temporarily 'under construction' splash page. I know, I know... but it will be one in style, I hope. :)

什么,主要是出于搜索引擎优化的目的,是最好的HTTP状态代码,用于显示暂时不可用的网址(相同的网址将再次包含内容,新网站启动后。)

What, mostly for SEO purposes, is the best HTTP status code to dish out for the URLs that will be temporarily unavailable (the same URLs will have content again, after the new site is up).

现在,我的网站流量几乎没有任何重要性,但作为一名网络开发者,我希望在我的工具箱中获取这些知识以用于未来可能的客户项目。还有什么更好的方法来测试和试验这个,现在我对自己的网站有一个方便的理由。

Now, my website traffic is hardly of any importance, but as a webdeveloper I want this knowledge in my toolbox for possible future client projects. And what better way to test and experiment with this, now that I have a convenient 'reason' with my own website.

这里有一些我想过的:

503看起来很吸引人,但属于服务器错误类别。

204看起来也很吸引人,但我宁愿暂时重定向到启动页面。

307看起来是最好的选择,但我并不完全确定。

Here's a few I thought about:
503 looks appealing, but is in the category of server errors.
204 looks appealing as well, but I'd rather temporarily redirect to the splash page.
307 looks like the best choice, but I'm not entirely sure.

还有其他几个。所以我很想听听你的建议。谢谢

There are a few others as well. So I'm curious to hear your advice. Thanks

推荐答案

我不同意所选答案。我会使用503代码。

I disagree to the selected answer. I would use the 503 code.

根据 HTTP / 1.1的RFC


503服务不可用

由于
临时超载或维护服务器,服务器当前无法处理请求。暗示
是这是一个临时条件,在
延迟一段时间后会缓解。

The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay.

是的,它应该是一个错误,因为预期的页面不会出现。

Yes, it should be an error, because the expected page will not appear.

这篇关于暂时不可用页面的HTTP状态代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆