AES Encryption Explained: How It Works and Why It Matters
Jun 23, 2026
3xx Redirection
The 308 (Permanent Redirect) status code is the method-preserving counterpart of 301. Like 301, it indicates the resource has moved permanently. But like 307, it requires the client to preserve the HTTP method. This is important for non-GET requests like POST, PUT, and DELETE where changing the method would change the semantics.
When migrating a REST API endpoint from /v1/users to /v2/users permanently, use 308 Permanent Redirect for POST, PUT, and DELETE requests so the method and body are preserved. For GET requests, 301 is functionally equivalent and still an acceptable choice.
// Laravel - permanent redirect preserving method
return redirect()
->away('https://api.example.com/v2/users')
->setStatusCode(308);
Mistake: Using 301 for POST endpoints that need method preservation
Fix: Most browsers change POST to GET when following a 301 redirect. For API endpoints that handle POST, PUT, or DELETE, use 308 Permanent Redirect to preserve the HTTP method.
Mistake: Using 308 for temporary redirects
Fix: 308 is a permanent redirect. Browsers and search engines will cache and reuse the new URL. For temporary situations, use 307 Temporary Redirect instead.
Blog
Jun 23, 2026
Jun 23, 2026
Jun 23, 2026
Jun 23, 2026
Jun 23, 2026
Jun 23, 2026