So jenkins.io repo has a ton of redirects from old systems (I see for sure drupal at one point). The current solution isn’t too bad. Essentially for each redirect, create a page that does a meta HTML redirect, and move the user to the new location.
This has a couple of issues though.
- Pages are still HTML files, so status code 200, so google will index both of them. Meaning lots of traffic to old URLs, and hard to get rid of them
- Sitemap.xml has all of those redirects, so see #1
- Waste of bandwidth to just do a redirect
?) Wonder how Algolia handles the redirect pages? hopefully properly
Long term, I know that @dduportal has plans on hooking up individual docker images for both jenkins.io and plugins.jenkins.io so we can have all the redirects and other Nginx configs baked right into the image. I know there are some blockers for that, and it’s not a priority.
So I’m wondering if there are other ways this could be handled. The only way I could think of is creating a C or LUA module that reads a redirects.json or something from the disk, and feeds it into Nginx at runtime (with a caching period).
It might be fun to write, but I’m not sure it is worth the effort. I want to have the discussion though.
Original thread from IRC