Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions config/nginx.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,18 @@ http {
return 302 https://www.python.org/dev/peps/;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The redirects above could have been updated too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just getting the minimum in place before we transition to permanent redirects. Once this has been out in the wild for a bit, I'll simplify the whole setup.

Also plan to add a Surrogate-Key so we can purge all the redirects being dispatched from Nginx.

location ~ ^/dev/peps/?(.*)$ {
return 302 https://peps.python.org/$1/;
}

location ~ ^/peps/(.*)\.html$ {
return 302 https://peps.python.org/$1/;
}

location ^/(dev/)?peps(/.*)?$ {
return 302 https://peps.python.org/;
}

location ~ ^/sf(.*)$ {
if ($is_args != "") {
return 302 http://legacy.python.org/sf?$args;
Expand Down