HTTP Common Status Codes

Source: Internet
Author: User

the request was successful. Typically used for Get and post requests

301 Moved Permanently permanent movement. The requested resource has been permanently moved to the new URI, the return information will include the new URI, and the browser will automatically redirect to the new URI. Any future new requests should be replaced with a new URI

302 Found temporary movement. Similar to 301. But resources are only temporarily moved. The client should continue to use the original URI

304 Not Modified has not been modified. The requested resource is not modified and no resources are returned when the server returns this status code. Clients typically cache accessed resources by providing a header indicating that the client wants to return only the resources modified after the specified date

Bad Request syntax error for client, server does not understand

401 Unauthorized request for user authentication

403 Forbidden Server understands request client requests, but refuses to execute this request

404 Not the Found server could not find resources (Web pages) based on client requests. With this code, the Web designer can set up a personalized page that "the resource you requested could not be found"

408 Request Timeout server waits for too long to be sent by the client, time-out

Internal server error Server internal errors, unable to complete the request

501 Not implemented server does not support the requested feature and cannot complete the request

502 Bad Gateway acts as a gateway or proxy server, receiving an invalid request from the remote server

503 Service Unavailable The server is temporarily unable to process client requests due to overloading or system maintenance. The length of the delay can be included in the server's Retry-after header information

504 Gateway Timeout acts as a server for gateways or proxies and does not get requests from remote servers in a timely manner

505 HTTP Version not supported a server that acts as a gateway or proxy and does not get requests from the remote server in time

PHP sends a 404 status code to the client:

Header ("http/1.1 404 Not Found"); Header ("status:404 not Found"); exit;

PHP uses headers for 301 redirects (permanent):

Header ("http/1.1 301 Moved Permanently"); Header ("location:http://www.example.com/"); Exit ();

PHP uses headers for 302 redirects (temporary):

Header ("location:http://www.example.com/"); Exit ();

HTTP Common Status Codes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.