From 2edd8545b59b20e9b4cace0f5c75d77871481e5e Mon Sep 17 00:00:00 2001 From: Taras Yemets Date: Mon, 23 Nov 2026 12:06:40 +0000 Subject: [PATCH 1/2] chore/legacy-docs: Serve docs-legacy.sourcegraph.com Amp-Thread-ID: https://ampcode.com/threads/T-01a207a3-fb91-7792-82e8-513ee72342ce --- vercel.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index a7ddb4842..41e305b04 100644 --- a/vercel.json +++ b/vercel.json @@ -2,13 +2,21 @@ "$schema": "https://openapi.vercel.sh/vercel.json", "fluid": true, "ignoreCommand": "sh dev/vercel-ignore-build.sh", + "redirects": [ + { + "source": "/((?!docs(?:/|$)).+)", + "has": [{"type": "host", "value": "docs-legacy.sourcegraph.com"}], + "destination": "https://sourcegraph.com/docs/$1", + "permanent": false + } + ], "headers": [ { "source": "/(.*)", "has": [ { "type": "host", - "value": "^(\\d+\\.\\d+\\.sourcegraph\\.com|ms-docs\\.sg\\.dev)$" + "value": "^(\\d+\\.\\d+\\.sourcegraph\\.com|ms-docs\\.sg\\.dev|docs-legacy\\.sourcegraph\\.com)$" } ], "headers": [{"key": "X-Robots-Tag", "value": "noindex, nofollow"}] From 63ffd82514c78d2b938fa54a6dd4559ba24e3f56 Mon Sep 17 00:00:00 2001 From: Taras Yemets Date: Mon, 23 Nov 2026 12:18:09 +0000 Subject: [PATCH 2/2] chore/legacy-docs: Keep old docs-legacy links on the legacy site --- vercel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index 41e305b04..f1459fa46 100644 --- a/vercel.json +++ b/vercel.json @@ -6,7 +6,7 @@ { "source": "/((?!docs(?:/|$)).+)", "has": [{"type": "host", "value": "docs-legacy.sourcegraph.com"}], - "destination": "https://sourcegraph.com/docs/$1", + "destination": "/docs/$1", "permanent": false } ],