Skip to content

Commit 2479524

Browse files
committed
Redirect full version archive files to {major}.{minor}
1 parent a851c6d commit 2479524

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

salt/docs/config/nginx.docs-redirects.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ location ~ ^/((2|3)(\.[0-9]+)?|dev)/\w+/[\d\w\.]+(?!\.html)$ {
186186
}
187187
}
188188

189+
# Map archive URLs to {major}.{minor}
190+
location ~ ^/([a-z-]*/)?(3|3.12|3.13|3.14)/archives/python-(3.12|3.13|3.14)\.\d+((a|b|rc)\d)?-docs(-(html|pdf-a4|pdf-letter|texinfo|text)\.(zip|tar\.bz2)|\.epub)$ {
191+
return 301 https://$host/$1$2/archives/python-$3-docs$6;
192+
}
193+
189194
# Map old, 2.5-and-earlier directory names to 2.6-and-later names.
190195
location = /lib/ {
191196
return 301 https://$host/library/;

0 commit comments

Comments
 (0)