From e77e8d71bde3a492e65fcf1b9adb2cd2263fe7f4 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 20:58:29 -0400 Subject: [PATCH] fix: redirect to the correct page for old doc versions --- contrib/build-docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/build-docs b/contrib/build-docs index ed503eb3a..70ec058d8 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -48,7 +48,7 @@ main() { if [[ "$major" -lt 1 ]]; then if [[ "$current_version" != "$version" ]] && [[ "$minor" -lt 28 ]]; then - echo "rewrite ^/docs~$version/(.*)$ /docs~$current_version/\$1 last;" > "tmp/docs-build/nginx.conf.d/$version.conf" + echo "rewrite ^/docs~v$version/(.*)$ /docs~v$current_version/\$1 redirect;" > "tmp/docs-build/nginx.conf.d/$version.conf" rm -rf "tmp/docs-build/docs~v${version}" patch=$((patch - 1)) continue