diff --git a/docs/_extra/_redirects b/docs/_extra/_redirects index f70212b..29712f0 100644 --- a/docs/_extra/_redirects +++ b/docs/_extra/_redirects @@ -2,16 +2,15 @@ # Docs: https://www.netlify.com/docs/redirects/ # Redirect http to https (avoid one extra hop with an explicit rule for /en/latest/) -http://docs.python-guide.org/en/latest/* https://docs.python-guide.org/:splat 302! -http://docs.python-guide.org/* https://docs.python-guide.org/:splat 302! +http://docs.python-guide.org/en/latest/* https://docs.python-guide.org/:splat 301! +http://docs.python-guide.org/* https://docs.python-guide.org/:splat 301! # Redirect RTD prefix to / -/en/latest/* /:splat 302! - -# TODO: Make those cacheable 301s when we're done -# TODO: Redirect Netlify URL to python-guide.org -# https://python-guide.netlify.com/* https://docs.python-guide.org/:splat 302! +/en/latest/* /:splat 301! # Redirect domain aliases to primary domain -http://python-guide.org/* http://docs.python-guide.org/:splat 302! -https://python-guide.org/* https://docs.python-guide.org/:splat 302! +http://python-guide.org/* http://docs.python-guide.org/:splat 301! +https://python-guide.org/* https://docs.python-guide.org/:splat 301! + +# Redirect Netlify version to primary domain +https://python-guide.netlify.com/* https://docs.python-guide.org/:splat 301!