Skip to content

Commit

Permalink
Update devguide redirects (#495)
Browse files Browse the repository at this point in the history
* Update devguide redirects

* Add an explanatory comment
  • Loading branch information
AA-Turner authored Sep 23, 2024
1 parent 20e0021 commit fee8afb
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions salt/docs/config/nginx.docs-backend.conf
Original file line number Diff line number Diff line change
Expand Up @@ -149,28 +149,28 @@ server {
return 301 https://devguide.python.org/$1;
}
location = /documenting/ {
return 301 https://devguide.python.org/documenting.html;
return 301 https://devguide.python.org/documentation/start-documenting/;
}
location = /documenting/index.html {
return 301 https://devguide.python.org/documenting.html;
return 301 https://devguide.python.org/documentation/start-documenting/;
}
location = /documenting/intro.html {
return 301 https://devguide.python.org/documenting.html#introduction;
return 301 https://devguide.python.org/documentation/start-documenting/#introduction;
}
location = /documenting/style.html {
return 301 https://devguide.python.org/documenting.html#style-guide;
return 301 https://devguide.python.org/documentation/style-guide/;
}
location = /documenting/rest.html {
return 301 https://devguide.python.org/documenting.html#restructuredtext-primer;
return 301 https://devguide.python.org/documentation/markup/;
}
location = /documenting/markup.html {
return 301 https://devguide.python.org/documenting.html#additional-markup-constructs;
return 301 https://devguide.python.org/documentation/markup/;
}
location = /documenting/fromlatex.html {
return 301 https://devguide.python.org/documenting.html#differences-to-the-latex-markup;
return 301 https://devguide.python.org/documentation/markup/;
}
location = /documenting/building.html {
return 301 https://devguide.python.org/documenting.html#building-the-documentation;
return 301 https://devguide.python.org/documentation/start-documenting/#building-the-documentation;
}

# Map toplevel URIs to Python 3 docs.
Expand All @@ -186,6 +186,8 @@ server {

# Emulate Apache's content-negotiation. Was a temporary measure,
# but now people are using it like a feature.
# Redirect ``$request_uri`` -> ``$request_uri.html``,
# where the latter is a valid webpage.
location ~ ^/((2|3)(\.[0-9]+)?|dev)/\w+/[\d\w\.]+(?!\.html)$ {
if (-f "${request_filename}.html") {
return 301 https://$host:$request_uri.html;
Expand Down

0 comments on commit fee8afb

Please sign in to comment.