From 4eda1c7bf5385fb9ca964c20224af7b39c445ebd Mon Sep 17 00:00:00 2001 From: Halison Fernandes Date: Tue, 14 Nov 2023 10:33:28 -0300 Subject: [PATCH 1/2] Fix d10 assets redirect issue. --- conf/presets/drupal.conf.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/presets/drupal.conf.tmpl b/conf/presets/drupal.conf.tmpl index 47908c2..9bbaf34 100644 --- a/conf/presets/drupal.conf.tmpl +++ b/conf/presets/drupal.conf.tmpl @@ -47,7 +47,7 @@ location / { } location @rewrite { - rewrite ^/(.*)$ /index.php?q=$1; + rewrite ^ /index.php; } # Don't allow direct access to PHP files in the vendor directory. From d4804b03d21af405bab27eb77a99efce2aad56c3 Mon Sep 17 00:00:00 2001 From: Halison Fernandes Date: Wed, 15 Nov 2023 17:24:10 -0300 Subject: [PATCH 2/2] Add css and js directories to be processed by PHP. --- conf/presets/drupal.conf.tmpl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/conf/presets/drupal.conf.tmpl b/conf/presets/drupal.conf.tmpl index 9bbaf34..cedc76c 100644 --- a/conf/presets/drupal.conf.tmpl +++ b/conf/presets/drupal.conf.tmpl @@ -89,10 +89,9 @@ location ~ '\.php$|^/update.php' { fastcgi_keep_conn on; } -# Fighting with Styles? This little gem is amazing. -# location ~ ^/sites/.*/files/imagecache/ { # For Drupal <= 6 -location ~ ^/sites/.*/files/styles/ { # For Drupal >= 7 - try_files $uri @rewrite; +# Passes image style and asset generation to PHP. +location ~ ^/sites/.*/files/(css|js|styles)/ { + try_files $uri @rewrite; } # Handle private files through Drupal. Private file's path can come