Skip to content

Commit fbc25fc

Browse files
hmaestahaoqunjiang
authored andcommitted
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]>
1 parent 2ab93e7 commit fbc25fc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/guide/deployment.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,15 @@ Commit both the `.gitlab-ci.yml` and `vue.config.js` files before pushing to you
133133
134134
Also checkout [vue-cli-plugin-netlify-lambda](https://github.com/netlify/vue-cli-plugin-netlify-lambda).
135135
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+
136145
### Amazon S3
137146
138147
See [vue-cli-plugin-s3-deploy](https://github.com/multiplegeorges/vue-cli-plugin-s3-deploy).

0 commit comments

Comments
 (0)