From de05aecb618c9d8676373323078e7232d0700014 Mon Sep 17 00:00:00 2001 From: Roger Date: Tue, 12 Aug 2025 04:33:22 +0000 Subject: [PATCH 1/2] Unexisting sitemap responds with product image --- nginx.conf.sample | 2 +- pub/media/.htaccess | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx.conf.sample b/nginx.conf.sample index 85e2fb66dec94..9c495c3822eae 100644 --- a/nginx.conf.sample +++ b/nginx.conf.sample @@ -164,7 +164,7 @@ location /media/ { # image_filter_jpeg_quality 90; # } - try_files $uri $uri/ /get.php$is_args$args; + # try_files $uri $uri/ /get.php$is_args$args; location ~ ^/media/theme_customization/.*\.xml { deny all; diff --git a/pub/media/.htaccess b/pub/media/.htaccess index 1e536b9b4b61a..5a466336e8a09 100644 --- a/pub/media/.htaccess +++ b/pub/media/.htaccess @@ -33,7 +33,7 @@ SetHandler default-handler ############################################ ## rewrite everything else to get.php - RewriteRule .* ../get.php [L] + RewriteRule .*.(ico|jpg|jpeg|png|gif|svg|svgz|webp|avif|avifs|js|css|eot|ttf|otf|woff|woff2|zip|gz|gzip|bz2|csv|xml)$ ../get.php [L] ############################################ From a4b9bdc3bfd4d097c79eb9c21c5106dbbdc04721 Mon Sep 17 00:00:00 2001 From: rogerdz Date: Thu, 14 Aug 2025 03:32:52 +0000 Subject: [PATCH 2/2] update code --- nginx.conf.sample | 2 +- pub/media/.htaccess | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx.conf.sample b/nginx.conf.sample index 9c495c3822eae..be5cff37e8e61 100644 --- a/nginx.conf.sample +++ b/nginx.conf.sample @@ -180,7 +180,7 @@ location /media/ { add_header Cache-Control "no-store"; add_header X-Frame-Options "SAMEORIGIN"; expires off; - try_files $uri $uri/ /get.php$is_args$args; + # try_files $uri $uri/ /get.php$is_args$args; } add_header X-Frame-Options "SAMEORIGIN"; } diff --git a/pub/media/.htaccess b/pub/media/.htaccess index 5a466336e8a09..f58e492bb67a5 100644 --- a/pub/media/.htaccess +++ b/pub/media/.htaccess @@ -33,7 +33,7 @@ SetHandler default-handler ############################################ ## rewrite everything else to get.php - RewriteRule .*.(ico|jpg|jpeg|png|gif|svg|svgz|webp|avif|avifs|js|css|eot|ttf|otf|woff|woff2|zip|gz|gzip|bz2|csv|xml)$ ../get.php [L] + RewriteRule .*.(ico|jpg|jpeg|png|gif|svg|svgz|webp|avif|avifs|js|css|eot|ttf|otf|woff|woff2)$ ../get.php [L] ############################################