From 48e48c43c73ec066633be64e721d53d143872602 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Sat, 20 Apr 2024 04:55:07 +0100 Subject: [PATCH] feat: added a redirect for the old skynet format of user addresses --- applications/skynet.ie.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/applications/skynet.ie.nix b/applications/skynet.ie.nix index b56a189..a691388 100644 --- a/applications/skynet.ie.nix +++ b/applications/skynet.ie.nix @@ -72,7 +72,17 @@ in { "skynet.ie" = { forceSSL = true; useACMEHost = "skynet"; - root = "${inputs.skynet_website.defaultPackage."x86_64-linux"}"; + locations = { + "/" = { + root = "${inputs.skynet_website.defaultPackage."x86_64-linux"}"; + }; + + # this redirects old links to new format + "~* ~(?[a-z_0-9]*)(?\\S+)$" = { + priority = 1; + return = "307 https://$username.users.skynet.ie$files"; + }; + }; }; # archive of teh site as it was ~2012 to 2016