@blake @karl_lew @HongDa @chansik_park @Aminah
When building the current PWA site, we introduced the new concept of “author/edition” into the URL, thus enabling multiple translations for the same sutta (or editions of the root text).
This was a major change that unfortunately broke a bunch of third party work and applications that assumed we had a stable URL structure. At the time, we just had to bite the bullet and bear the cost.
But, and I’m I’m really embarrassed and frustrated by this, we dropped the ball on designing the new URLs. Or rather, I dropped the ball: getting good URLs has been a passion of mine since the beginning, and I just let this one through.
Currently we have:
https://suttacentral.net/mn136/en/sujato
That is: sutta ID/language/author
The problem is, we need to be able to add section numbers to the URL, and that becomes bad:
https://suttacentral.net/mn136/en/sujato#7
O-yo! The section number is split apart from the sutta ID, and tagged awkwardly at the end. That is ugly and unintuitive, and worse, it makes it really hard to write a link for a section or segment.
Consider too, the case with the segmented texts. If I have a consistent segment, I can easily swap out the language and/or author and get the same segment in a different edition. But if the ID is broken, this becomes ugly and hard.
What to do?
The URLs should have a form like this:
https://suttacentral.net/en/sujato/mn136#7
So:
- Should we make this change?
- Is it possible to write a redirect so that URLs of the old form will not break?
- Are there other options?