Hey web devs, not breaking links doesn’t have to be hard…
Heard of the 404 → 307 technique? (Well, now you have!)
PS. Did I mention Kitten has built-in support for evergreen web?
https://kitten.small-web.org/reference/#evergreen-web-404-307
@aral I don't get it
@aral Are Mementos (RFC7089) still a thing? Sounds a bit like the same thing but being more explicit about what happens.
@chrysn Not sure, first time I’m hearing of it. Will look it up :)
@aral Oh that is *clever!!!* I’m (a) going to do this too and (2) blog about it!
@rubenerd Yay! Please do + let me know when it’s up :)
@aral
So the idea is to presrve the entire website on a deprecated/historical subdomain, then redirect progressively back in time until a hit or a 404-for-the-ages?
And the redirect means relative links will already be on the 2017 subdomajn so won't be masked by newer resources.
That is pretty slick!
@silvermoon82 Glad you like it. Do let me know if you end up implementing it somewhere.
Maybe we can have a little list of sites that do…
@aral Why 307 instead of 301 or 308?
@aral i'm not really understanding how it works. I'm in the process of migrating wordpress with 15 years of posts to hugo and this stuff might be immensely useful
@dandandin Basically, if a path is not found on the latest server, it redirects to the same path on the previous server.
Does this help clarify it: https://mapstodon.space/@jorgesanz/113520807453587002
@aral
interesting workaround!
@aral ooh that's cool
@anselmschueler Thanks! Do let me know if you end up using it somewhere :)
@aral The way I'm currently hosting my website probably doesn't support this. I would have to find a way to get a (cheap dedicated) proxy server that rewrites this, or to find a way to get GitHub Pages to route based on domain…
I mean, I should switch to a better way to host it anyways. But I should also actually finish my small rewrite and write content. And I should also acquire money and free time to be able to do that…
@aral Do you have any good resources or guides on how a non-web-savvy designer can make their website better in terms of small tech, privacy etc?
@angietaylor Not a comprehensive one but there was this mini site I wrote up back when Google announced FLoC that still has some general guidelines (nothing that should come as a revelation, really).
@aral having planned to migrate my servers soon and probably going to inadvertently break links, this is a really good solution to mitigate that, thanks for the heads up
@ipg Yay! Please do let me know if you end up implementing it. I’d love to feature sites that do on the homepage :)
@aral Really like this approach to preserving links! Would there anyway to do this without still running the old site, e.g. DNS + wayback machine?
@JeffersonBledsoe You could just rewrite the links to Wayback Machine, I guess. But it doesn’t store things exactly as they were always. That said, you could also try a static export of some sort and map to that. You could have that on the same machine. That’s what I do on ar.al with a static export of my Wordpress content going back a few decades.