From 86f74e42a5222e1b83f604a12c786c2d1ad6f0e3 Mon Sep 17 00:00:00 2001 From: Carter Snook Date: Mon, 5 Oct 2020 07:20:49 -0500 Subject: [PATCH] docs: add netlify section for history mode rewrites (#510) [skip ci] --- docs/guide/essentials/history-mode.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/guide/essentials/history-mode.md b/docs/guide/essentials/history-mode.md index 6411f564..ecc941dc 100644 --- a/docs/guide/essentials/history-mode.md +++ b/docs/guide/essentials/history-mode.md @@ -149,6 +149,16 @@ Add this to your `firebase.json`: } ``` +### Netlify + +Create a `_redirects` file with the following code: + +``` +/* /index.html 200 +``` + +Read more about [Netlify redirecting options](https://docs.netlify.com/routing/redirects/rewrites-proxies/#history-pushstate-and-single-page-apps) for more info. + ## Caveat There is a caveat to this: Your server will no longer report 404 errors as all not-found paths now serve up your `index.html` file. To get around the issue, you should implement a catch-all route within your Vue app to show a 404 page: -- 2.47.3