mattdesl / budo

:clapper: a dev server for rapid prototyping
MIT License
2.17k stars 106 forks source link

pushstate doesn't work as expected. #225

Closed edankwan closed 6 years ago

edankwan commented 6 years ago

I am using static html files and set the base url to /. I have a html page at /foo/index.html. If I navigate the url http://localhost:9966/foo/, it bounces back to the index.html at the root instead of the one in foo. But if I use the full path http://localhost:9966/foo/index.html, it works just fine.

mattdesl commented 6 years ago

Hmm... I wonder if there is a standard approach to push-state routing? Usually when I have used push-state and SPA server architecture, it has been to rewrite all routes to the home /index.html. This is also how it seems that connect-pushstate applies things.

edankwan commented 6 years ago

Okay no problem. I am using the middleware feature to do the sniffing and replace the request.url in my application to resolve it atm. Let me close this issue.