我正在爲其他公司創建網頁。如果本網站創建錯誤或者有任何錯誤,我不能將其出售給公司。我知道有幾種類型的http狀態碼。我知道例如地址錯誤時出現404錯誤,但我不知道其他任何http狀態碼。任何人都可以告訴我他們是什麼嗎?網頁錯誤代碼的類型
編輯:
我也想知道這可以由我風格。因此,例如404狀態碼可以在我自己的方式,說在.htaccess文件我的文檔的位置風格
我正在爲其他公司創建網頁。如果本網站創建錯誤或者有任何錯誤,我不能將其出售給公司。我知道有幾種類型的http狀態碼。我知道例如地址錯誤時出現404錯誤,但我不知道其他任何http狀態碼。任何人都可以告訴我他們是什麼嗎?網頁錯誤代碼的類型
編輯:
我也想知道這可以由我風格。因此,例如404狀態碼可以在我自己的方式,說在.htaccess文件我的文檔的位置風格
所有可能的代碼。主要用於處理錯誤情況我們關心的是和系列。
解決方案: 檢查HTTP響應代碼屬於400或500系列,如果是,則重定向頁面的一些錯誤頁面定義錯誤消息哪裏出了問題或定義一些自定義的信息展現給客戶端(更有意義最終用戶)。這樣,應用程序將優雅地處理錯誤場景。
-> 100:
return "Continue";
-> 101:
return "Switching Protocols";
-> 102:
return "Processing (WebDAV)";
-> 200:
return "OK";
-> 201:
return "Created";
-> 202:
return "Accepted";
-> 203:
return "Non-Authoritative Information";
-> 204:
return "No Content";
-> 205:
return "Reset Content";
-> 206:
return "Partial Content";
-> 207:
return "Multi-Status (WebDAV)";
-> 300:
return "Multiple Choices";
-> 301:
return "Moved Permanently";
-> 302:
return "Found";
-> 303:
return "See Other";
-> 304:
return "Not Modified";
-> 305:
return "Use Proxy";
-> 307:
return "Temporary Redirect";
-> 400:
return "Bad Request";
-> 401:
return "Unauthorized";
-> 402:
return "Payment Required";
-> 403:
return "Forbidden";
-> 404:
return "Not Found";
-> 405:
return "Method Not Allowed";
-> 406:
return "Not Acceptable";
-> 407:
return "Proxy Authentication Required";
-> 408:
return "Request Time-out";
-> 409:
return "Conflict";
-> 410:
return "Gone";
-> 411:
return "Length Required";
-> 412:
return "Precondition Failed";
-> 413:
return "Request Entity Too Large";
-> 414:
return "Request-URI Too Large";
-> 415:
return "Unsupported Media Type";
-> 416:
return "Requested range not satisfiable";
-> 417:
return "Expectation Failed";
-> 422:
return "Unprocessable Entity (WebDAV)";
-> 423:
return "Locked (WebDAV)";
-> 424:
return "Failed Dependency (WebDAV)";
-> 500:
return "Internal Server Error";
-> 501:
return "Not Implemented";
-> 502:
return "Bad Gateway";
-> 503:
return "Service Unavailable";
-> 504:
return "Gateway Time-out";
-> 505:
return "HTTP Version not supported";
-> 507:
return "Insufficient Storage (WebDAV)";
-> 510:
return "Not Extended";
你會發現這裏的HTTP狀態代碼的完整列表: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
是你在尋找http狀態碼?如果是的話,請檢查這個維基連結http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
有幾個地方看看:
List of HTTP status codes - Wikipedia
HTTP Error and Status Codes Explained
100-199:信息狀態
200-299:成功狀態
300-399:重定向狀態
400-499:客戶端錯誤
500-599:服務器錯誤
其實這僅僅是400-500碼這很重要。其他的也很重要,但並不重要。