tool::http-status-detail
308 Permanent Redirect
Permanent redirect preserving the original HTTP method.
상태 코드
308
이름
Permanent Redirect
카테고리
3xx상세 설명
HTTP 308 Permanent Redirect는 리소스가 영구적으로 새 URL로 이동했음을 나타내며, HTTP 메서드를 반드시 보존합니다. 301과 유사하지만, 308은 POST, PUT 등의 메서드를 변경하지 않습니다. REST API에서 엔드포인트를 영구 변경할 때 301 대신 사용하면 클라이언트 메서드가 보존됩니다.
주요 원인
- ▸API 엔드포인트를 영구적으로 변경하며 POST 메서드를 보존해야 하는 경우
- ▸도메인 변경 시 API 클라이언트의 메서드를 그대로 유지해야 하는 경우
- ▸URL 구조 재설계 후 PUT/DELETE 요청의 영구 리다이렉트
- ▸마이크로서비스 이전 후 이전 경로를 새 서비스로 영구 연결
해결 방법
- 1.308은 정상 동작이므로 클라이언트는 새 URL로 업데이트하세요
- 2.SEO 관점에서는 301과 동일하게 PageRank가 전달됩니다
- 3.GET 전용이라면 301을 사용해도 무방합니다
- 4.Location 헤더에 올바른 새 URL이 포함되어 있는지 확인하세요
관련 HTTP 헤더
LocationCache-Control응답 예시
HTTP/1.1 308 Permanent Redirect Location: https://api.newdomain.com/v2/users Cache-Control: public, max-age=31536000
관련 상태 코드
300Multiple ChoicesMultiple options for the requested resource.→301Moved PermanentlyThe resource has permanently moved to a new URL.→302FoundThe resource is temporarily at a different URL.→303See OtherRedirect to another resource using GET.→304Not ModifiedThe cached version is still valid; no new content to return.→
ad · 300×250
// related tools