Skip to content

Commit 1677ed4

Browse files
committed
Redirect full version archive files to {major}.{minor}
1 parent 3d0eae9 commit 1677ed4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ server {
200200
}
201201
}
202202

203+
# Map archive URLs to {major}.{minor}
204+
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)$ {
205+
return 301 https://$host/$1$2/archives/python-$3-docs$6;
206+
}
207+
203208
# Map old, 2.5-and-earlier directory names to 2.6-and-later names.
204209
location = /lib/ {
205210
return 301 https://$host/library/;

0 commit comments

Comments
 (0)