From 43bc4fb631af80431d76c5aa9009b0704d6b382f Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Tue, 3 Jan 2023 22:52:43 +0100 Subject: Put "try_files" directive into "location" context When used in the "server" context, the "try_files" directive will never get executed if there also is a "location / {}" block specified (which is most likely the case on a production vhost config). --- .ht-nginx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.ht-nginx b/.ht-nginx index 168e8c0..ca9d22d 100644 --- a/.ht-nginx +++ b/.ht-nginx @@ -31,4 +31,6 @@ location ~ ^/(.git|core|theme/([^/]+)/(html|lang))/ { #=============================================================================== # Pass requests to index.php #=============================================================================== -try_files $uri $uri/ /index.php?$args; +location / { + try_files $uri $uri/ /index.php?$args; +} -- cgit v1.2.3