diff --git a/applications/skynet.ie/wiki.nix b/applications/skynet.ie/wiki.nix index c5f106e..5e9530b 100644 --- a/applications/skynet.ie/wiki.nix +++ b/applications/skynet.ie/wiki.nix @@ -41,6 +41,15 @@ in { forceSSL = true; useACMEHost = "skynet"; root = "${inputs.skynet_website_renew.defaultPackage."x86_64-linux"}/wiki"; + # https://stackoverflow.com/a/38238001/11964934 + extraConfig = '' + location / { + if ($request_uri ~ ^/(.*)\.html) { + return 302 /$1; + } + try_files $uri $uri.html $uri/ =404; + } + ''; }; # redirect old links to the new wiki