thewca / worldcubeassociation.org

All of the code that runs on worldcubeassociation.org
https://www.worldcubeassociation.org/
GNU General Public License v3.0
327 stars 175 forks source link

Legacy PHP redirects no longer work #9133

Open jfly opened 6 months ago

jfly commented 6 months ago

Describe the bug

Urls like https://www.worldcubeassociation.org/results/p.php?i=2007COHE01 result in a 404.

Expected behavior

I expect these urls to redirect to their modern equivalent. In the example above, that would be https://www.worldcubeassociation.org/persons/2007COHE01.

I suspect this broke last month when https://github.com/thewca/worldcubeassociation.org/commit/c0fb3553836018b34c391c0e63f66e349ae0a7c7#r140357389 got merged up. You can see in chef/site-cookbooks/wca/templates/worldcubeassociation.org.conf.erb that there was a whole section titled "Legacy PHP redirects" that I suspect didn't get ported anywhere.

Why is this important?

Cool URIs don't change. We can't control all the existing webpages out there that link to the WCA website (think of all the news articles and now-unmaintained personal websites). Whenever possible, the WCA website should preserve these old links.

jfly commented 3 months ago

Ping. @FinnIckler, was this change intentional? Is this something you'd be open to a PR implementing?

FinnIckler commented 3 months ago

This was intentional yes. It's because we dropped the nginx and didn't want to invest any time recreating this with Rails. I don't think I'll personally open a PR for this, but we probably would accept contributions (@gregorbg tell me if I'm wrong)