Open miquelraynal opened 1 year ago
Old links can also contain versions, example
I think it would also be good to redirect from links without versions to a selected old version, perhaps whatever was latest when Elixir was released
If we want to handle this in web.py, it will still be necessary to change Apache config a bit - currently, it seems that (even on production) a URL path that starts with source
does not match web.py (also see Docker config and the default Apache 404 page on https://elixir.bootlin.com/source).
Handling this fully in Apache is probably possible, but will be hard, see: https://stackoverflow.com/questions/63314539/apache-rewrite-query-param-to-path-url
On stack overflow I see stale links like: http://lxr.free-electrons.com/source/drivers/tty/serial/8250/8250_early.c#L19 lxr.free-electrons.com is correctly swapped with elixir.bootlin.com, so the above link jumps to: https://elixir.bootlin.com/source/drivers/tty/serial/8250/8250_early.c#L19 Instead of: https://elixir.bootlin.com/linux/latest/source/drivers/tty/serial/8250/8250_early.c#L19 I have no idea if that is easily fixable, but if yes, might be worth creating the link which adds {,linux/latest/}