Skip to content

Commit

Permalink
chore(netlify): force=true to all redirects (hexojs#1375)
Browse files Browse the repository at this point in the history
The redirect behavior will be changed since April 7th. Redirects without the forced rules will not work if the file exists for a given path. This pull request adds `force = true` to all `redirects` in `netlify.toml`.

https://community.netlify.com/t/changed-behavior-in-redirects/10084/16
https://docs.netlify.com/configure-builds/file-based-configuration/#redirects
  • Loading branch information
tommy351 authored Apr 4, 2020
1 parent b57d577 commit ff5c753
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,35 @@
to = "/zh-tw/"
status = 302
conditions = {Language = ["zh-tw", "zh-hk"]}
force = true

[[redirects]]
from = "/"
to = "/zh-cn/"
status = 302
conditions = {Language = ["zh", "zh-cn"]}
force = true

[[redirects]]
from = "/"
to = "/ru/"
status = 302
conditions = {Language = ["ru"]}
force = true

[[redirects]]
from = "/"
to = "/ko/"
status = 302
conditions = {Language = ["ko"]}
force = true

[[redirects]]
from = "/"
to = "/pt-br/"
status = 302
conditions = {Language = ["pt-br"]}
force = true

[[headers]]
for = "/*"
Expand Down

0 comments on commit ff5c753

Please sign in to comment.