diff options
Diffstat (limited to 'nixos/sites/default.nix')
-rw-r--r-- | nixos/sites/default.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/sites/default.nix b/nixos/sites/default.nix index 95d8055..032803e 100644 --- a/nixos/sites/default.nix +++ b/nixos/sites/default.nix @@ -12,6 +12,15 @@ locations = { "/" = { root = root; + extraConfig = '' + if ($request_uri ~ ^/(.*)\.html$) { + return 302 /$1; + } + if ($request_uri ~ ^/(.*)/$) { + return 302 /$1; + } + try_files $uri $uri.$extension $uri/ =404; + ''; }; }; }; |