Serving built output leads to 404 on routes
See original GitHub issueSteps to reproduce:
- Follow the Getting Started guide.
- Run
mdx-deck build deck.mdx
. - Serve the built
public
directory. For example,npx serve public
. I reproduced with an nginx host as well. - Navigate to a slide other than the starting point, for example the second slide (
/1
). - Refresh the page. You’ll see a 404.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Standlone output + Dynamic Routes results in 404 of /index
The problem is when I build with outputStandalone enabled, the /index shows 404 when I started the service with node .next/standalone/server.js .
Read more >Angular 2: 404 error occur when I refresh through the browser
To fix the 404 error, you need to update your server to serve the index.html file for each route path you defined. If...
Read more >How To Properly Serve 404 Errors on SPAs (with SEO in Mind)
When you write your site as a SPA, one of the first steps is to move the "URL routing" logic out of the...
Read more >How to fix 404 error when accessing a specific URL for create ...
The solution is to set some web server configuration to route all requests to /index.html (that's what the SO article you linked to...
Read more >Why am I receiving a 404 not found when I try to access a ...
I am using nodejs. When I try to access a route other than “/”, I receive 404 not found. It works https://www.celr.com.br.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Are you using
gatsby serve
for this? I’m not sure if your setup would handle the client-side routing the way that Gatsby might expect…How about providing a config field that we can switch the router mode to hash router? That will be perfect for a pure static file server in JAMStack likes GitHub Pages.