Metaculus / metaculus

https://www.metaculus.com
BSD 2-Clause "Simplified" License
54 stars 12 forks source link

Redirect to new slug when changing project slug #1485

Open ryooan opened 16 hours ago

ryooan commented 16 hours ago

Current behavior

Currently if you change a project slug in admin, it seems the old url then 404s.

Concretely, I just changed the threshold day one project from this url: https://www.metaculus.com/tournament/threshold2030-day-one/

To this one: https://www.metaculus.com/tournament/threshold2030/

And now the old one 404s.

Expected/desired behavior

Previously on prod it was the case that when you changed a slug, the old url would automatically take you to the new url.

Projects should maintain a history of past slugs, so that if you navigate to that url and get a 404 you're redirected to the latest for it.

One important thing to note, we've been operating such that metaculus.com/tournaments/quarterly-cup always points to the latest quarterly cup. So it should only redirect if the url 404s, or make sure the most recent duplicate url is the current one.