search
HomeCommon ProblemWhat are the http status codes?
What are the http status codes?Jun 05, 2019 pm 02:10 PM
http status code

What are the http status codes?

Common http status codes are as follows:

200 - The server successfully returned the web page
404 - The requested web page does not exist
503 - The service is unavailable

Detailed breakdown:

1xx (Provisional response)

A status code that indicates a temporary response and requires the requester to continue performing the operation.

Code Description
100 (Continue) The requester should continue making the request. The server returns this code to indicate that it has received the first part of the request and is waiting for the remainder.
101 (Switch protocol) The requester has asked the server to switch protocols, and the server has confirmed and is ready to switch.

2xx (Successful)

Status code indicating that the request was successfully processed.
Code Description
200 (Success) The server has successfully processed the request. Typically, this means that the server served the requested web page.
201 (Created) The request was successful and the server created a new resource.
202 (Accepted) The server has accepted the request but has not yet processed it.
203 (Unauthorized Information) The server successfully processed the request, but the information returned may have come from another source.
204 (No Content) The server successfully processed the request but returned no content.
205 (Reset Content) The server successfully processed the request but returned no content.
206 (Partial content) The server successfully processed part of the GET request.

3xx (Redirect)

Indicates that further operations are required to complete the request. Typically, these status codes are used for redirects.
Code Description
300 (Multiple Choices) In response to the request, the server can perform a variety of operations. The server can select an action based on the requester (user agent) or provide a list of actions for the requester to choose from.
301 (Permanently Moved) The requested web page has been permanently moved to a new location. When the server returns this response (in response to a GET or HEAD request), it automatically forwards the requester to the new location.
302 (Temporary Move) The server is currently responding to requests from a web page in a different location, but the requester should continue to use the original location for future requests.
303 (View Other Locations) The server returns this code when the requester should use separate GET requests to different locations to retrieve a response.
304 (Unmodified) The requested web page has not been modified since the last request. When the server returns this response, no web page content is returned.
305 (Using a proxy) The requester can only access the requested web page using a proxy. If the server returns this response, it also indicates that the requester should use a proxy.
307 (Temporary Redirect) The server is currently responding to requests from a web page in a different location, but the requester should continue to use the original location for future requests.

The above is the detailed content of What are the http status codes?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
http状态码520是什么意思http状态码520是什么意思Oct 13, 2023 pm 03:11 PM

http状态码520是指服务器在处理请求时遇到了一个未知的错误,无法提供更具体的信息。用于表示服务器在处理请求时发生了一个未知的错误,可能是由于服务器配置问题、网络问题或其他未知原因导致的。通常是由服务器配置问题、网络问题、服务器过载或代码错误等原因导致的。如果遇到状态码520错误,最好联系网站管理员或技术支持团队以获取更多的信息和帮助。

PHP如何获取http状态码PHP如何获取http状态码Oct 07, 2023 pm 02:53 PM

PHP可以通过使用curl扩展和使用file_get_contents函数来获取http状态码。详细介绍:1、使用curl扩展,初始化curl会话,设置curl选项,执行curl会话,获取HTTP状态码,关闭curl会话;2、使用file_get_contents函数,发送HTTP请求,获取HTTP状态码。

504 gateway timeout是什么意思504 gateway timeout是什么意思Mar 02, 2023 pm 04:01 PM

504 gateway timeout的意思为“504网关超时”,是指服务器作为网关或代理,但是没有及时从上游服务器收到请求。504错误表示尝试为用户加载页面的Web服务器没有从其请求信息的其他服务器得到及时的响应。之所以称为504错误,是因为这是Web服务器用来定义此类错误的HTTP状态代码。

PHP正则表达式实战:匹配HTTP状态码PHP正则表达式实战:匹配HTTP状态码Jun 23, 2023 am 09:33 AM

PHP正则表达式实战:匹配HTTP状态码在网站开发中,HTTP状态码是一个很重要的概念。根据HTTP协议规定,每个HTTP响应都应该包含一个3位数字的状态码,用于告诉客户端请求的处理结果。如果你正在使用PHP开发网站,那么掌握正则表达式来匹配HTTP状态码是很有用的技能。HTTP状态码的分类HTTP状态码按照首位数字分为以下5类:1xx:信息性状态码,表示服

http状态码405是什么http状态码405是什么Dec 05, 2023 am 10:44 AM

HTTP状态码405表示 “Method Not Allowed”,即请求中指定的方法不被允许,通常发生在尝试使用不被允许的HTTP方法,如GET、POST、PUT、DELETE等访问特定的资源时。

http状态码重定向是什么http状态码重定向是什么Oct 13, 2023 pm 03:22 PM

http状态码重定向是指在客户端向服务器发送请求时,服务器返回的状态码为3xx的情况,当服务器收到请求后,根据不同的情况,可能会要求客户端进行进一步的操作,如访问其他URL,重新发送请求等,这种情况下,服务器会返回一个重定向的状态码,告诉客户端应该如何处理请求。常见的重定向状态码包括301、302、303、307等,它的使用可以帮助网站实现页面跳转、URL重写、负载均衡等功能。

http状态码0表示什么http状态码0表示什么Oct 18, 2023 am 10:15 AM

HTTP状态码不包括0,如果在HTTP响应中看到一个以0开头的数字,那很可能是由于某种错误导致的异常情况或非标准的扩展,在正常的HTTP通信中,不会出现以0开头的状态码。

http返回状态码有哪些http返回状态码有哪些Oct 18, 2023 pm 03:22 PM

http返回状态码有100、101、200、201、204、301、302、304、400、401、403、404、500、502、503等。详细介绍:1、100,服务器已经接收到请求的头部,并且客户端应该继续发送请求的剩余部分;2、101,服务器要求切换协议,例如从HTTP协议切换到WebSocket协议;3、200,请求已成功处理,并返回所请求的数据;4、401等等。

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!