{
  "id": "dcab9ee1ab42eb82c2c4bcb3",
  "source": "solid:signals",
  "type": "github-document",
  "title": "spa",
  "content": "---\ntitle: Single page applications\nuse_cases: \u003e-\n  client-side routing, cdn deployment, static hosting, spa configuration,\n  deployment setup\ntags:\n  - spa\n  - deployment\n  - cdn\n  - hosting\n  - client-side\n  - routing\nversion: '1.0'\ndescription: \u003e-\n  Configure single-page applications for proper CDN and hosting deployment.\n  Handle client-side routing without server-side rendering.\n---\n\nWhen deploying applications that use a client-side router without relying on Server-Side Rendering, it is important that redirects to the index page are handled properly.\nThis prevents the CDN or hosting service from returning a \"not found\" error when accessing URLs that do not correspond to files.\n\nEach provider has a different way of doing this.\nFor example, Netlify provides a `_redirects` file that contains:\n\n```sh frame=\"none\"\n/*   /index.html   200\n```\n\nVercel, on the other hand, requires a rewrites section in your `vercel.json`:\n\n```json\n{\n\t\"rewrites\": [\n\t\t{\n\t\t\t\"source\": \"/(.*)\",\n\t\t\t\"destination\": \"/index.html\"\n\t\t}\n\t]\n}\n```",
  "url": "https://github.com/solidjs/solid-docs/blob/HEAD/src/routes/solid-router/rendering-modes/spa.mdx",
  "metadata": {
    "path": "src/routes/solid-router/rendering-modes/spa.mdx",
    "repo": "solidjs/solid-docs",
    "repo_url": "https://github.com/solidjs/solid-docs.git",
    "size": 1031,
    "source_type": "github"
  },
  "hash": "f21662f127026edbf483f3a230c2f972fc35fdbdc8f950acb0c980a9b14bfdc7",
  "timestamp": "2026-02-23T11:43:00.19344109+01:00"
}