File tree 2 files changed +5
-6095
lines changed
tests/docs-redirects/specs 2 files changed +5
-6095
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ location ~ ^/(es|fr|id|it|ja|ko|pl|pt-br|tr|uk|zh-cn|zh-tw)/$ {
12
12
return 302 $scheme://$host/$1/3/;
13
13
}
14
14
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
+
15
20
# Some doc download pages link to docs.python.org/ftp instead of www.python.org/ftp.
16
21
location ^~ /ftp/python/doc {
17
22
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
192
197
add_header Surrogate-Key $1/$2 always;
193
198
}
194
199
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
-
200
200
# Map old, 2.5-and-earlier directory names to 2.6-and-later names.
201
201
location = /lib/ {
202
202
return 301 https://$host/3/library/;
@@ -228,8 +228,3 @@ location = /doc/ {
228
228
location = /ref/ {
229
229
return 301 https://$host/3/reference/;
230
230
}
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
- }
You can’t perform that action at this time.
0 commit comments