HTTP 308 Permanent Redirect とは?
HTTP 308 Permanent Redirect の解説と、CI/CD やデプロイで見かけたときの意味。
HTTP 308 は、HTTP メソッドとボディを保持する恒久的なリダイレクトです。
意味
308 は 301 のメソッド保持版です。POST を POST のまま保ちつつ、新しい URL を恒久的に使うようクライアントに伝えます。
CI/CD で見かけるとき
恒久的に移動した API を叩く CI の deploy スクリプトは、308 でメソッドが保持され、301 の GET 格下げの落とし穴を回避できます。
重要なポイント
- 308 は恒久的なリダイレクトです。
- メソッドを保持します。
- 301 のメソッド安全版です。
関連ガイド
What Is HTTP 301 Moved Permanently?HTTP 301 Moved Permanently is a permanent redirect. Learn how it affects API calls and CI checks.
What Is HTTP 307 Temporary Redirect?HTTP 307 Temporary Redirect preserves the request method. Learn how it differs from 302.
What Is a REST API? Resource-Oriented Web APIsA REST API exposes resources over HTTP using standard methods and status codes. Learn what REST is and how CI…