]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
docs: add netlify section for history mode rewrites (#510) [skip ci]
authorCarter Snook <cartersnook04@gmail.com>
Mon, 5 Oct 2020 12:20:49 +0000 (07:20 -0500)
committerGitHub <noreply@github.com>
Mon, 5 Oct 2020 12:20:49 +0000 (14:20 +0200)
docs/guide/essentials/history-mode.md

index 6411f564a3daa43dc254a6eda1c34a74a04e62a7..ecc941dcabd1083fc041f9cece0f3364244aa2ad 100644 (file)
@@ -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: