Skip to content

Commit 5ea5714

Browse files
authored
Revert "Redirect full version archive files to {major}.{minor} (#498)"
This reverts commit 355ffe5.
1 parent 355ffe5 commit 5ea5714

File tree

2 files changed

+5
-6095
lines changed

2 files changed

+5
-6095
lines changed

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

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ location ~ ^/(es|fr|id|it|ja|ko|pl|pt-br|tr|uk|zh-cn|zh-tw)/$ {
1212
return 302 $scheme://$host/$1/3/;
1313
}
1414

15+
# Pretty 404 for archives telling to wait for them to be built.
16+
location ~ \.(pdf|zip|epub|bz2)$ {
17+
error_page 404 /404.html;
18+
}
19+
1520
# Some doc download pages link to docs.python.org/ftp instead of www.python.org/ftp.
1621
location ^~ /ftp/python/doc {
1722
return 301 https://www.python.org$request_uri;
@@ -192,11 +197,6 @@ location ~ ^/(es|fr|id|it|ja|ko|pl|pt-br|tr|uk|zh-cn|zh-tw)/((2|3)(\.[0-9]+)?|de
192197
add_header Surrogate-Key $1/$2 always;
193198
}
194199

195-
# Map archive URLs to {major}.{minor}
196-
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)$ {
197-
return 301 https://$host/$1$2/archives/python-$3-docs$6;
198-
}
199-
200200
# Map old, 2.5-and-earlier directory names to 2.6-and-later names.
201201
location = /lib/ {
202202
return 301 https://$host/3/library/;
@@ -228,8 +228,3 @@ location = /doc/ {
228228
location = /ref/ {
229229
return 301 https://$host/3/reference/;
230230
}
231-
232-
# Pretty 404 for archives telling to wait for them to be built.
233-
location ~ \.(pdf|zip|epub|bz2)$ {
234-
error_page 404 /404.html;
235-
}

0 commit comments

Comments
 (0)