From c3481ff4c538100320cd34dc1f94c13cff0c2524 Mon Sep 17 00:00:00 2001 From: lannyfu Date: Tue, 5 Aug 2025 10:02:36 +0800 Subject: [PATCH] feat: Redirect docs Signed-off-by: lannyfu --- netlify.toml | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/netlify.toml b/netlify.toml index 166866126..3b138df3b 100644 --- a/netlify.toml +++ b/netlify.toml @@ -29,16 +29,28 @@ force = true [[redirects]] - from = "^/(zh/)?docs/(v3\\.3|v3\\.4|v4\\.1)(/.*)?$" - to = "/404.html" - status = 404 + from = "/docs/" + to = "https://docs.kubesphere.com.cn " + status = 301 + force = true + +[[redirects]] + from = "/docs/*" + to = "https://docs.kubesphere.com.cn " + status = 301 + force = true + +[[redirects]] + from = "/zh/docs/" + to = "https://docs.kubesphere.com.cn " + status = 301 + force = true + +[[redirects]] + from = "/zh/docs/*" + to = "https://docs.kubesphere.com.cn " + status = 301 force = true - conditions = { Role = "all" } -[[headers]] - for = "^(/zh)?/docs/(v3\\.3|v3\\.4|v4\\.1)(/.*)?$" - [headers.values] - Cache-Control = "no-store, max-age=0" - X-Robots-Tag = "noindex, nofollow"