From 08affd955864970b476ca1cace2d0db8688f6164 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sun, 14 Feb 2021 09:48:51 -0500 Subject: [PATCH] make redirects more robust --- nginx/nginx.conf | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 4511fb1c..6aef6e32 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -120,6 +120,15 @@ http { return 301 $1/$2; } + if ($request_uri ~ ^(.*)/index$) { + return 301 $1/; + } + + # https://www.twipu.com/GrapheneOS doesn't handle links with fragments properly + if ($request_uri ~ "^/(.*)