Skip to content

Instantly share code, notes, and snippets.

@alpha14
alpha14 / redirects.md
Last active May 2, 2022 18:13
Server Side static redirects

Platform server side static redirects comparison

Feature Gitlab Cloudflare Netlify Example
Redirects ✔️ Yes
200, 301, 302
✔️ Yes
301, 302, 303, 307, 308
✔️ Yes /wardrobe.html /narnia.html 302
Rewrites ✔️ Yes ✔️ Yes ✔️ Yes /* / 200
Rewrites (other than 200) ❌ No ❌ No ✔️ Yes /en/* /en/404.html 404
Splats ✔️ Yes ✔️ Yes ✔️ Yes /news/* /blog/:splat
Placeholders ✔️ Yes ✔️ Yes ✔️ Yes /news/:year/:month/:date /blog-:year-:month-:date.html
Query parameters ❌ No ❌ No ✔️ Yes /store id=:id /blog/:id 301