From 9c192635c4d61cc82557b321d10a944184f1b875 Mon Sep 17 00:00:00 2001 From: Mike Wright Date: Mon, 16 Dec 2019 13:07:47 -0700 Subject: [PATCH 1/3] Update history-mode.md for Apache subdir examples As-is, the docs for how to configure Apache when using a sub-directory were not sufficient for me. I was not able to get it to work until I expanded the configuration a la the suggested doc updates. --- docs/guide/essentials/history-mode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/essentials/history-mode.md b/docs/guide/essentials/history-mode.md index 5eeaad033..2fc67d58b 100644 --- a/docs/guide/essentials/history-mode.md +++ b/docs/guide/essentials/history-mode.md @@ -19,7 +19,7 @@ Not to worry: To fix the issue, all you need to do is add a simple catch-all fal ## Example Server Configurations -**Note**: The following examples assume you are serving your app from the root folder. If you deploy to a subfolder, you should use [the `publicPath` option of Vue CLI](https://cli.vuejs.org/config/#publicpath) and the related [`base` property of the router](https://router.vuejs.org/api/#base). You also need to adjust the examples below to use the subfolder instead of the root folder (e.g. replacing `RewriteBase /` with `RewriteBase /name-of-your-subfolder/`). +**Note**: The following examples assume you are serving your app from the root folder. If you deploy to a subfolder, you should use [the `publicPath` option of Vue CLI](https://cli.vuejs.org/config/#publicpath) and the related [`base` property of the router](https://router.vuejs.org/api/#base). You also need to adjust the examples below to use the subfolder instead of the root folder (e.g. replacing `RewriteBase /` with `RewriteBase /name-of-your-subfolder`, `RewriteRule ^index\.html$ -[L]` with `RewriteRule ^name-of-your-subfolder/index\.html$ -[L]` and `RewriteRule . /index.html [L]` with `RewriteRule . /name-of-your-subfolder/index.html [L]`). #### Apache From 81eeaae7e257d0a18374a8878365397f65e8a349 Mon Sep 17 00:00:00 2001 From: Mike Wright Date: Mon, 16 Dec 2019 13:10:50 -0700 Subject: [PATCH 2/3] Update history-mode.md for Apache with subfolder Changed verbiage and placement to more closely align with the Apache example. --- docs/guide/essentials/history-mode.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/guide/essentials/history-mode.md b/docs/guide/essentials/history-mode.md index 2fc67d58b..ac2e4af23 100644 --- a/docs/guide/essentials/history-mode.md +++ b/docs/guide/essentials/history-mode.md @@ -19,7 +19,7 @@ Not to worry: To fix the issue, all you need to do is add a simple catch-all fal ## Example Server Configurations -**Note**: The following examples assume you are serving your app from the root folder. If you deploy to a subfolder, you should use [the `publicPath` option of Vue CLI](https://cli.vuejs.org/config/#publicpath) and the related [`base` property of the router](https://router.vuejs.org/api/#base). You also need to adjust the examples below to use the subfolder instead of the root folder (e.g. replacing `RewriteBase /` with `RewriteBase /name-of-your-subfolder`, `RewriteRule ^index\.html$ -[L]` with `RewriteRule ^name-of-your-subfolder/index\.html$ -[L]` and `RewriteRule . /index.html [L]` with `RewriteRule . /name-of-your-subfolder/index.html [L]`). +**Note**: The following examples assume you are serving your app from the root folder. If you deploy to a subfolder, you should use [the `publicPath` option of Vue CLI](https://cli.vuejs.org/config/#publicpath) and the related [`base` property of the router](https://router.vuejs.org/api/#base). You also need to adjust the examples below to use the subfolder instead of the root folder (e.g. replacing `RewriteBase /` with `RewriteBase /name-of-your-subfolder`. #### Apache @@ -34,6 +34,8 @@ Not to worry: To fix the issue, all you need to do is add a simple catch-all fal ``` +If using subfolders, you'll need to adjust `RewriteBase` as per above along with `RewriteRule ^index\.html$ -[L]` to `RewriteRule ^name-of-your-subfolder/index\.html$ -[L]` and `RewriteRule . /index.html [L]` to `RewriteRule . /name-of-your-subfolder/index.html [L]`). + Instead of `mod_rewrite`, you could also use [`FallbackResource`](https://httpd.apache.org/docs/2.2/mod/mod_dir.html#fallbackresource). #### nginx From 74ae494bbc930d38cc2102750257a9d079c95d17 Mon Sep 17 00:00:00 2001 From: Mike Wright Date: Fri, 13 Nov 2020 21:14:29 -0700 Subject: [PATCH 3/3] Update history-mode.md Change apache to apacheconf --- docs/guide/essentials/history-mode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/essentials/history-mode.md b/docs/guide/essentials/history-mode.md index ac2e4af23..d2dbbe0b2 100644 --- a/docs/guide/essentials/history-mode.md +++ b/docs/guide/essentials/history-mode.md @@ -23,7 +23,7 @@ Not to worry: To fix the issue, all you need to do is add a simple catch-all fal #### Apache -```apache +```apacheconf RewriteEngine On RewriteBase /