From dcac75c98ee015180b37660dd3affe93fd70f2f0 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Mon, 3 Jul 2017 01:21:58 +0930 Subject: [PATCH] Add configuration settings for Caddy --- docs/en/essentials/history-mode.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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: