File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
tests/docs-redirects/specs Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,12 @@ location ~ \.(pdf|zip|epub|bz2)$ {
18
18
}
19
19
20
20
# Some doc download pages link to docs.python.org/ftp instead of www.python.org/ftp.
21
- location ^~ /ftp/ {
21
+ location ^~ /ftp/python/doc {
22
22
return 301 https://www.python.org$request_uri;
23
23
}
24
24
25
- location ~ /py3k(.*)$ {
25
+ # Py3k is Python 3
26
+ location ~ ^/py3k(.*)$ {
26
27
return 301 https://$host/3$1;
27
28
}
28
29
@@ -169,7 +170,7 @@ location = /documenting/building.html {
169
170
location ~ ^/((archives|c-api|distutils|extending|faq|howto|install|library|reference|tutorial|using|whatsnew|_images|_sources|_static)(/.*)?)$ {
170
171
return 301 https://$host/3/$1;
171
172
}
172
- location ~ ^/(about|bugs|contents|copyright|download|genindex.* |glossary|index|license|py-modindex|search)(.html)?$ {
173
+ location ~ ^/(about|bugs|contents|copyright|download|genindex(-[^.]+)? |glossary|index|license|py-modindex|search)(.html)?$ {
173
174
return 301 https://$host/3/$1.html;
174
175
}
175
176
location ~ ^/(searchindex.js|objects.inv)$ {
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ header "Location" == "https://localhost/3/download.html"
53
53
GET {{host}}/genindex.html
54
54
HTTP 301
55
55
[Asserts]
56
- header "Location" == "https://localhost/3/genindex.html.html "
56
+ header "Location" == "https://localhost/3/genindex.html"
57
57
58
58
GET {{host}}/genindex
59
59
HTTP 301
@@ -63,7 +63,7 @@ header "Location" == "https://localhost/3/genindex.html"
63
63
GET {{host}}/genindex-_.html
64
64
HTTP 301
65
65
[Asserts]
66
- header "Location" == "https://localhost/3/genindex-_.html.html "
66
+ header "Location" == "https://localhost/3/genindex-_.html"
67
67
68
68
GET {{host}}/genindex-_
69
69
HTTP 301
@@ -73,7 +73,7 @@ header "Location" == "https://localhost/3/genindex-_.html"
73
73
GET {{host}}/genindex-A.html
74
74
HTTP 301
75
75
[Asserts]
76
- header "Location" == "https://localhost/3/genindex-A.html.html "
76
+ header "Location" == "https://localhost/3/genindex-A.html"
77
77
78
78
GET {{host}}/genindex-A
79
79
HTTP 301
@@ -83,7 +83,7 @@ header "Location" == "https://localhost/3/genindex-A.html"
83
83
GET {{host}}/genindex-Symbols.html
84
84
HTTP 301
85
85
[Asserts]
86
- header "Location" == "https://localhost/3/genindex-Symbols.html.html "
86
+ header "Location" == "https://localhost/3/genindex-Symbols.html"
87
87
88
88
GET {{host}}/genindex-Symbols
89
89
HTTP 301
You can’t perform that action at this time.
0 commit comments