diff --git a/public/netlify.toml b/public/netlify.toml index 634cf13d2f..d84857f01c 100644 --- a/public/netlify.toml +++ b/public/netlify.toml @@ -197,27 +197,45 @@ force = true [[redirects]] - # these rather old links are still used in the Nixpkgs manual - from = "/nix/manual/*" + from = "/manual/nix/stable/*" to = "https://nix.dev/manual/nix/stable/:splat" status = 302 force = true [[redirects]] - from = "/manual/nix/*" + from = "/manual/nix/unstable/*" to = "https://nix.dev/manual/nix/latest/:splat" status = 302 force = true [[redirects]] - from = "/manual/nix/stable/*" - to = "https://nix.dev/manual/nix/latest/:splat" + # catch links to the top-level + from = "/manual/nix" + # this must not have a trailing slash! + # otherwise, CSS won't be loaded + to = "https://nix.dev/manual/nix" status = 302 force = true [[redirects]] - from = "/manual/nix/unstable/*" - to = "https://nix.dev/manual/nix/development/:splat" + from = "/manual/nix/*" + to = "https://nix.dev/manual/nix/:splat" + status = 302 + force = true + +# these rather old links are still used in the Nixpkgs manual +[[redirects]] + # catch links to the top-level + from = "/nix/manual" + # this must not have a trailing slash! + # otherwise, CSS won't be loaded + to = "https://nix.dev/manual/nix" + status = 302 + force = true + +[[redirects]] + from = "/nix/manual/*" + to = "https://nix.dev/manual/nix/:splat" status = 302 force = true