From 78072df81c255f1b993ecd781660d4733c71b685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 27 May 2020 13:50:13 +0200 Subject: [PATCH] Add redirect support to the server Fixes #7323 --- content/en/getting-started/configuration.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index abce0286d..be46870d6 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -349,6 +349,20 @@ Content-Security-Policy = "script-src localhost:1313" {{< /code-toggle >}} +{{< new-in "0.72.0" >}} + +You can also specify simple redirects rules for the server. The syntax is again similar to Netlify's. + +Note that a `status` code of 200 will trigger a [URL rewrite](https://docs.netlify.com/routing/redirects/rewrites-proxies/), which is what you want in SPA situations, e.g: + +{{< code-toggle file="config/development/server">}} +[[redirects]] +from = "/myspa/**" +to = "/myspa/" +status = 200 +{{< /code-toggle >}} + + ## Configure Title Case