diff --git a/docs/en/essentials/history-mode.md b/docs/en/essentials/history-mode.md index ad1702e4f..ae4b778bc 100644 --- a/docs/en/essentials/history-mode.md +++ b/docs/en/essentials/history-mode.md @@ -45,7 +45,7 @@ location / { For Node.js/Express, consider using [connect-history-api-fallback middleware](https://github.com/bripkens/connect-history-api-fallback). #### Internet Information Services (IIS) -``` +```xml @@ -72,6 +72,14 @@ For Node.js/Express, consider using [connect-history-api-fallback middleware](ht ``` +#### Caddy +``` +rewrite { + regexp .* + to {path} / +} +``` + ## 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: