Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. HTTP
  3. Reference
  4. HTTP response status codes
  5. 302 Found

302 Found

The HTTP302 Foundredirection response status code indicates that the requested resource has been temporarily moved to the URL in theLocation header.

A browser receiving this status will automatically request the resource at the URL in theLocation header, redirecting the user to the new page.Search engines receiving this response will not attribute links to the original URL to the new resource, meaning noSEO value is transferred to the new URL.

Note:In theFetch Standard, when a user agent receives a302 in response to aPOST request, it uses theGET method in the subsequent redirection request, as permitted by the HTTPspecification.To avoid user agents modifying the request, use307 Temporary Redirect instead, as altering the method after a307 response is prohibited.

In cases where you want any request method to be changed toGET, use303 See Other.This is useful when you want to give a response to aPUT method that is not the uploaded resource but a confirmation message such as: "you successfully uploaded XYZ".

Status

http
302 Found

Examples

302 response with new URL

http
GET /profile HTTP/1.1Host: www.example.com
http
HTTP/1.1 302 FoundLocation: https://www.example.com/new-profile-urlContent-Type: text/html; charset=UTF-8Content-Length: 0

Specifications

Specification
HTTP Semantics
# status.302

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp