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)$ {
1818}
1919
2020# Some doc download pages link to docs.python.org/ftp instead of www.python.org/ftp.
21- location ^~ /ftp/ {
21+ location ^~ /ftp/python/doc {
2222 return 301 https://www.python.org$request_uri;
2323}
2424
25- location ~ /py3k(.*)$ {
25+ # Py3k is Python 3
26+ location ~ ^/py3k(.*)$ {
2627 return 301 https://$host/3$1;
2728}
2829
@@ -169,7 +170,7 @@ location = /documenting/building.html {
169170location ~ ^/((archives|c-api|distutils|extending|faq|howto|install|library|reference|tutorial|using|whatsnew|_images|_sources|_static)(/.*)?)$ {
170171 return 301 https://$host/3/$1;
171172}
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)?$ {
173174 return 301 https://$host/3/$1.html;
174175}
175176location ~ ^/(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"
5353GET {{host}}/genindex.html
5454HTTP 301
5555[Asserts]
56- header "Location" == "https://localhost/3/genindex.html.html "
56+ header "Location" == "https://localhost/3/genindex.html"
5757
5858GET {{host}}/genindex
5959HTTP 301
@@ -63,7 +63,7 @@ header "Location" == "https://localhost/3/genindex.html"
6363GET {{host}}/genindex-_.html
6464HTTP 301
6565[Asserts]
66- header "Location" == "https://localhost/3/genindex-_.html.html "
66+ header "Location" == "https://localhost/3/genindex-_.html"
6767
6868GET {{host}}/genindex-_
6969HTTP 301
@@ -73,7 +73,7 @@ header "Location" == "https://localhost/3/genindex-_.html"
7373GET {{host}}/genindex-A.html
7474HTTP 301
7575[Asserts]
76- header "Location" == "https://localhost/3/genindex-A.html.html "
76+ header "Location" == "https://localhost/3/genindex-A.html"
7777
7878GET {{host}}/genindex-A
7979HTTP 301
@@ -83,7 +83,7 @@ header "Location" == "https://localhost/3/genindex-A.html"
8383GET {{host}}/genindex-Symbols.html
8484HTTP 301
8585[Asserts]
86- header "Location" == "https://localhost/3/genindex-Symbols.html.html "
86+ header "Location" == "https://localhost/3/genindex-Symbols.html"
8787
8888GET {{host}}/genindex-Symbols
8989HTTP 301
You can’t perform that action at this time.
0 commit comments