Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Then we use this variable with:


Current Implementation

The first entity is the pattern to match, the second is the destination, and the third is a test URL. Prod for now doesn't use the default version and just redirects to the root. 

Our current default version is master. Either way the default version should be recent information. Queries to old pages are redirected.

Legacy URLsNew URL (desired redirect)Prod Test URLStaging Test URL











The goal for the following section is that any request to a resource of an old version is redirected to the default version. should go to

Content that should be freshNew URL (desired redirect)Prod Test URLStaging Test URL



















API test - this should load older content then switch versions to master. It should keep the anchor in the url.

Note that tutorials will carry the request for the particular tutorial over to the default version. Also, since some of the install links can carry a specific install type it might be good to add $1 to that one.



Redirect APIs that did not exist

Finally, we have several pages for API that don't exist and it is possible for the user to navigate to them. Instead of a broken page we give them a nice 404 or error message.


Test URL:

Error Pages

ErrorDocument 404


For all other APIs it should allow the queries to go through.

Error Redirect Issues

The error redirect uses a full URL instead of a local one because otherwise the error page doesn't render properly. 


One approach could be to fix the theme issue as mentioned above or somehow exempt the error page from regular Sphinx theming. Then the local URL could be used.

Testing Redirects

Use the following curl example from command line to see the redirect's output without having to use the browser!