http status code

最後更新: 2021-09-30

介紹

 

1xx: Informational - Request received, continuing process

2xx: Success - The action was successfully received, understood, and accepted

3xx: Redirection - Further action must be taken in order to complete the request

4xx: Client Error - The request contains bad syntax or cannot be fulfilled

5xx: Server Error - The server failed to fulfill an apparently valid request

 


2XX

 

200 OK
201 Created
202 Accepted
203 Non-Authoritative Information (since HTTP/1.1)
204 No Content
205 Reset Content
206 Partial Content
207 Multi-Status (WebDAV; RFC 4918)
208 Already Reported (WebDAV; RFC 5842)
226 IM Used (RFC 3229)

 


HTTP 301/302

 

An HTTP response with this status code will additionally provide a URL in the header field "Location"

curl -I http://mydomain

HTTP/1.1 301 Moved Permanently
Date: Thu, 28 Jun 2018 03:30:23 GMT
Server: Apache
Location: https://mydomain/
Content-Type: text/html; charset=iso-8859-1

HTTP 302

The HTTP/1.0 specification (RFC 1945) initially defined this code, and gives it the description phrase "Moved Temporarily".

HTTP 301

The 301 redirect is considered a best practice for upgrading users from HTTP to HTTPS.

i.e. http -> https

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

 


403.4

 

它是一個 IIS 上的 status code 來, 代表 "Require SSL"

SSL Settins > Require SSL

 

 

Creative Commons license icon Creative Commons license icon