You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: instructions about history pushstate in netlify (#2422) [ci skip]
* Instructions about History Pushstate in Netlify
Included instructions for users that use `History Pushstate mode` on Vue Router and run application on Netlify.
* Update docs/guide/deployment.md
Co-Authored-By: hmaesta <[email protected]>
Copy file name to clipboardExpand all lines: docs/guide/deployment.md
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,15 @@ Commit both the `.gitlab-ci.yml` and `vue.config.js` files before pushing to you
133
133
134
134
Also checkout [vue-cli-plugin-netlify-lambda](https://github.com/netlify/vue-cli-plugin-netlify-lambda).
135
135
136
+
In order to receive direct hits using `history mode` on Vue Router, you need to create a file called `_redirects` under `/public` with the following content:
137
+
138
+
```
139
+
# Netlify settings for single-page application
140
+
/* /index.html 200
141
+
```
142
+
143
+
More information on [Netlify redirects documentation](https://www.netlify.com/docs/redirects/#history-pushstate-and-single-page-apps).
144
+
136
145
### Amazon S3
137
146
138
147
See [vue-cli-plugin-s3-deploy](https://github.com/multiplegeorges/vue-cli-plugin-s3-deploy).
0 commit comments