diff --git a/nginx/nginx.conf b/nginx/nginx.conf index e1a8fde2..3ba8c8fd 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -137,10 +137,6 @@ 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 ~ "^/(.*)%3Ca%20href=$") { return 301 /$1; @@ -289,7 +285,7 @@ http { add_header Cache-Control "public, max-age=1800"; } - location ~ "\.(br|gz|html)$" { + location ~ "(/index|\.(br|gz|html))$" { internal; }