From 854c97615bae18f349367a789a7694592306d961 Mon Sep 17 00:00:00 2001 From: lscobe16 <54290585+lscobe16@users.noreply.github.com> Date: Sat, 18 Apr 2020 12:11:39 +0200 Subject: [PATCH] Add Lighttpd config for history-mode --- docs/guide/essentials/history-mode.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/guide/essentials/history-mode.md b/docs/guide/essentials/history-mode.md index 5eeaad033..e1c997195 100644 --- a/docs/guide/essentials/history-mode.md +++ b/docs/guide/essentials/history-mode.md @@ -124,6 +124,16 @@ Add this to your `firebase.json`: } ``` +#### Lighttpd + +Make sure `"mod_rewrite"` is included in `server.modules` and add this to your `lighttpd.conf`: + +``` +url.rewrite-if-not-file = ( + "^/(.*)" => "/index.html" +) +``` + ## 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: