diff --git a/modules/website.nix b/modules/website.nix index 8173712..e779f30 100644 --- a/modules/website.nix +++ b/modules/website.nix @@ -60,7 +60,7 @@ in fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; ''; }; - "~ ^/cmd/([^\\n|\\r]*)$".return = "301 https://pad.ifsr.de/$1"; + "~ ^/cmd(/?[^\\n|\\r]*)$".return = "301 https://pad.ifsr.de$1"; # security "~* /(\.git|cache|bin|logs|backup|tests)/.*$".return = "403"; # deny running scripts inside core system folders diff --git a/modules/wiki.nix b/modules/wiki.nix index 65beea9..f5f2d16 100644 --- a/modules/wiki.nix +++ b/modules/wiki.nix @@ -104,8 +104,8 @@ in proxyPass = "http://127.0.0.1:${toString listenPort}"; proxyWebsockets = true; }; - locations."~ ^/ese/([^\\n|\\r]*)$".return = "301 https://wiki.ese.ifsr.de/$1"; - locations."~ ^/fsr/([^\\n|\\r]*)$".return = "301 https://wiki.ifsr.de/$1"; + locations."~ ^/ese(/?[^\\n|\\r]*)$".return = "301 https://wiki.ese.ifsr.de$1"; + locations."~ ^/fsr(/?[^\\n|\\r]*)$".return = "301 https://wiki.ifsr.de$1"; }; }; };