diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-05-27 13:50:13 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-05-28 16:25:34 +0200 |
commit | 6a3e89743ccad58097a6dd203a63448946a2304d (patch) | |
tree | b360b4c713ddbaa7c55d486961a9c3e93e3aea8c /docs/content | |
parent | 9613e3e8a81be934fc88db3f9f0d79d429aae1a2 (diff) |
Add redirect support to the server
Fixes #7323
Diffstat (limited to 'docs/content')
-rw-r--r-- | docs/content/en/getting-started/configuration.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/content/en/getting-started/configuration.md b/docs/content/en/getting-started/configuration.md index abce0286d..be46870d6 100644 --- a/docs/content/en/getting-started/configuration.md +++ b/docs/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 |