summaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
Diffstat (limited to 'nixos')
-rw-r--r--nixos/sites/default.nix9
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;
+ '';
};
};
};