Open Hona opened 9 months ago
sorry bestie i have no clue what this means
Lets say you have 3 files in the webserver
if the user routes to localhost/b.html etc it routes as usual.
Assuming there is a 'fallback' route that is configured as 'a.html', if they route to localhost/d.html (the file isn't found) then the server returns 'localhost/d.html' -> 'localhost/a.html'
more reading:
https://laraveldaily.com/post/route-fallback-if-no-other-route-is-matched https://medium.com/@codingthang/fallback-route-on-rails-e19be25383dd
So this is "return a redirect instead of a 404"?
I would guess this could be added as yet another cli argumnet... you provide a file that you want to be auto-redirected to, and then a regex for what can 'detect' a 404 and instead server the redirect. This auto-redirect would obviously only kick in if the file that was directly requested wasn't found in the first place. Not sure how it would interact with serving index files.
Imagine I am using Blazor WebAssembly.
It starts from an index.html file but I would like to open a route, e.g.
/mypage
which the SPA can handle.Would be nice to add an option for a fallback file.
Otherwise, I've been loving this tool ⭐