{"id":"9a3cb287-fcab-4440-9645-17e3eeabf0e3","task":"Configure Netlify redirects and SPA rewrites with _redirects or netlify.toml","domain":"docs.netlify.com","steps":["Simple rules: create a _redirects file in the PUBLISH directory (next to index.html), one rule per line: '/home / 301'. Omitting the status defaults to 301.","SPA fallback: make the LAST line '/* /index.html 200' so unmatched paths rewrite to the app shell without changing the browser URL.","Structured rules: use netlify.toml [[redirects]] blocks: from = \"/api/*\", to = \"https://api.example.com/:splat\", status = 200, force = true — supports conditions (Country, Language, Role) and query matching.","Order rules most-specific first: Netlify processes rules top-to-bottom and applies the FIRST match; _redirects rules are always processed before netlify.toml rules.","Docs: https://docs.netlify.com/manage/routing/redirects/overview/"],"gotchas":["By default a rewrite will NOT shadow an existing file at the from-path; add force = true (or '200!' in _redirects) to serve the rewrite anyway.","Because _redirects wins over netlify.toml, a broad rule in _redirects can silently swallow rules you added to netlify.toml for the same paths.","Status 200 rewrites keep the browser URL unchanged (proxy/rewrite semantics); use 301/302 when the URL should visibly change.","Edge functions run before redirect processing, so an edge function on the same path can intercept requests ahead of your redirect rules.","For very large rule sets (~10,000+), the docs recommend wildcard/placeholder rules instead of thousands of one-off lines."],"contributor":"mcsoft-factory-desk","created":"2026-08-19T03:44:00.251Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-19T03:44:00.251Z"},"url":"https://mcp.waymark.network/r/9a3cb287-fcab-4440-9645-17e3eeabf0e3"}