Docs:Redirects - ansible/community GitHub Wiki

New redirects: How to handle each case?

  1. redirect-only inside the same collection (aka, permanaent alias).
    • [thoughts]
  2. redirect-only to a different collection.
    • [thoughts]
  3. deprecation with no redirect.
    • needs no special logic, since it is already handled by the regular docs build (ansible-test sanity ensures that runtime.yml deprecations agree with in-module deprecations)
  4. deprecation and redirect inside the same collection.
    • [thoughts]
  5. deprecation and redirect to a different collection.
    • [thoughts]

Existing redirects

Problem regex

Proposed fix:

  • Remove the redirect. We don't need it anymore (affects 2.4 and 2.3-style URLs coming into the modern era)
  • Replace with: RedirectMatch permanent "^/ansible/(devel|latest)/([^/]+_module).html$" "/ansible/$1/modules/$2.html"