nixos-homepage icon indicating copy to clipboard operation
nixos-homepage copied to clipboard

/nixos/manual/unstable/options.html redirects to /manual/nixos/stable/unstable/options.html

Open sternenseemann opened this issue 3 years ago • 5 comments

This should of course instead redirect to /manual/nixos/unstable/options.html. Seems like an oversight while setting up these redirects.

sternenseemann avatar Apr 18 '21 08:04 sternenseemann

It looks like this might be the offending code in netlify.toml:

[[redirects]]
  from = "/nixos/manual/*"
  to = "/manual/nixos/stable/:splat"
  status = 302
  force = true

The question is... if we change it to:

[[redirects]]
  from = "/nixos/manual/*"
  to = "/manual/nixos/:splat"
  status = 302
  force = true

...will it break anything?

timfenney avatar Feb 03 '23 04:02 timfenney

As I mentioned in my Draft PR (https://github.com/NixOS/nixos-homepage/pull/980), it seems we need the netlify cli tool for the netlify redirect rules to take place in development.

@fricklerhandwerk do you have any idea how to proceed with this? I followed the instructions to fire up the nix shell for development, but I don't have a netlify cli in my PATH it seems.

timfenney avatar Feb 03 '23 06:02 timfenney

Unfortunately this hasn't been super-clear to me.

This issue claims this redirect is a problem: /nixos/manual/unstable/options.html -> /manual/nixos/stable/unstable/options.html

However, when I look at @garbas commit above, it seems that this rule is causing the behaviour:

a68a4e2ce0 (Rok Garbas         2020-08-21 14:27:49 +0200 163) [[redirects]]
a68a4e2ce0 (Rok Garbas         2020-08-21 14:27:49 +0200 164)   from = "/nix/manual/*"
a68a4e2ce0 (Rok Garbas         2020-08-21 14:27:49 +0200 165)   to = "/manual/nix/stable/:splat"
a68a4e2ce0 (Rok Garbas         2020-08-21 14:27:49 +0200 166)   status = 302
a68a4e2ce0 (Rok Garbas         2020-08-21 14:27:49 +0200 167)   force = true

... but since "unstable manuals were added" with this commit, it seems like the issue is complaining about something that was never a viable URL?

@garbas did this URL exist prior to this commit here? If not I think we can close this :sweat_smile:

timfenney avatar Feb 10 '23 19:02 timfenney

The URL did exist as proven by my browser history, it was a viable URL before the website was redesigned (so it predates this repository, I think).

sternenseemann avatar Feb 10 '23 19:02 sternenseemann

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/homepage-redirect-policy/25335/8

nixos-discourse avatar Feb 10 '23 21:02 nixos-discourse