We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e267179 commit 0d7908bCopy full SHA for 0d7908b
docs/zh/guide/deployment.md
@@ -19,7 +19,7 @@ serve -s dist
19
20
### 使用 `history.pushState` 的路由
21
22
-如果你在 `history` 模式下使用 Vue Router,是无法搭配简单的静态文件服务器的。例如,如果你使用 Vue Router 为 `/todos/42/` 定义了一个路由,开发服务器已经配置了相应的 `localhost:3000/todos/42` 相应,但是一个为生产环境构建架设的简单的静态服务器会却会返回 404。
+如果你在 `history` 模式下使用 Vue Router,是无法搭配简单的静态文件服务器的。例如,如果你使用 Vue Router 为 `/todos/42/` 定义了一个路由,开发服务器已经配置了相应的 `localhost:3000/todos/42` 响应,但是一个为生产环境构建架设的简单的静态服务器会却会返回 404。
23
24
为了解决这个问题,你需要配置生产环境服务器,将任何没有匹配到静态文件的请求回退到 `index.html`。Vue Router 的文档提供了[常用服务器配置指引](https://router.vuejs.org/zh/guide/essentials/history-mode.html)。
25
0 commit comments