AstroJS — SPA-like behavior using 404 pages

How to serve the default index.html for any SPA URL in AstroJS using static builds, no adapters necessary

Sai Ramachandran
3 min readDec 14, 2023

--

Problem

Photo by Andre Hunter on Unsplash

While building SquadGPT using AstroJS, I faced an issue supporting paths like /conversation/uuid-1 and /jd/uuid-2.

--

--

Sai Ramachandran

Building https://squadgpt.ai - GPT for teams. Manage AI costs and retain visibility with SquadGPT. All views personal. Email = sai@squadgpt.ai