404 if direct access to specific route.

#39 · closed · 2 comments

View on GitHub ↗

pupubird

Hi! I am currently trying to duplicate what you had done in `https://github.com/lukeed/svelte-demo` using Navaid. However, if I directly accessing my `/about` page, it returns me 404, it does work fine if I have a button to redirect from `/`. May I know how should I set up so that it allows me to directly accessing `/about` without going through `/`? Thanks a lot

Comments

lukeed

Hey, It sounds like your file/devserver isn't running in SPA mode, and so it's sending a 404 because it can't find `about.html` (or similar). If you're using sirv, you need the `--single` flag, like this: https://github.com/lukeed/svelte-demo/blob/master/package.json#L8-L9

pupubird

Oh! Got it! Thank you very much!