++++
<script>
const currentAnchor = window.location.hash.substring(1); // Remove the '#' symbol

const redirectionRules = {
  "sec:enforcing_dependency_version": "dependency_versions.html#sec:enforcing-dependency-version",
  "sec:strict-version-consequences": "dependency_versions.html#sec:strict-version-consequences",
  "forced_dependencies_vs_strict_dependencies": "resolution_rules.html#sec:forcing-dep-versions",
  "sec:excluding-transitive-deps": "resolution_rules.html#sec:exclude-trans-deps"
};

const defaultRedirect = "dependency_versions.html";

if (currentAnchor) {
  if (redirectionRules[currentAnchor]) {
    window.location.href = redirectionRules[currentAnchor];
  }
} else {
  window.location.href = defaultRedirect;
}
</script>
++++
