-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fallback file for SPA sites #159
Comments
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 |
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 ⭐
The text was updated successfully, but these errors were encountered: