aaPanel_Jose
My url rewrite
#removefor ssl renew?
if ($host = spare-wheel.com) {
return 301 https://www.$host$request_uri;
} # managed by Certbot
location ~ /123456opcache{
allow all;
}
location = /ads.txt {
allow all;
log_not_found off;
access_log off;
}
location = /loaderio-fb6cf14f18d72b4ddd6a4f874bf47940.txt {
allow all;
log_not_found off;
access_log off;
}
#redirect all /taxonomy/term/378/all/feed
location ~ /taxonomy/term/[^/]+/all/feed$ {
return 301 https://www.spare-wheel.com;
}
#location ~ /frontpage?page=$ {
# return 301 https://www.spare-wheel.com;
#}
#location ~ /frontpage {
# return 301 https://www.spare-wheel.com;
#}
#redirect all ~*\.jpg?itok=$
#location ~*\.jpg?itok=$ {
# return 301 *\.jpg;
#}
#https://www.nginx.com/resources/wiki/start/topics/recipes/drupal/
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
}
location ~ \..*/.*\.php$ {
return 403;
}
location ~ ^/sites/.*/private/ {
return 403;
}
# Block access to scripts in site files directory
location ~ ^/sites/[^/]+/files/.*\.php$ {
deny all;
}
# Allow "Well-Known URIs" as per RFC 5785
#location ~* ^/.well-known/ {
# allow all;
#}
# Block access to "hidden" files and directories whose names begin with a
# period. This includes directories used by version control systems such
# as Subversion or Git to store control files.
location ~ (^|/)\. {
return 403;
}
location / {
# try_files $uri @rewrite; # For Drupal <= 6
try_files $uri /index.php?$query_string; # For Drupal >= 7
}
location @rewrite {
rewrite ^/(.*)$ /index.php?q=$1;
}
# Don't allow direct access to PHP files in the vendor directory.
location ~ /vendor/.*\.php$ {
deny all;
return 404;
}
# Protect files and directories from prying eyes.
location ~* \.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock)|web\.config)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$ {
deny all;
return 404;
}
# 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;
}
# Handle private files through Drupal. Private file's path can come
# with a language prefix.
location ~ ^(/[a-z\-]+)?/system/files/ { # For Drupal >= 7
try_files $uri /index.php?$query_string;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|eot|ttf|woff|woff2)$ {
#try_files $uri @rewrite;
etag on;
expires 365d;
add_header Pragma "public";
add_header Cache-Control "max-age=31536000, public";
log_not_found off;
}
# Enforce clean URLs
# Removes index.php from urls like www.example.com/index.php/my-page --> www.example.com/my-page
# Could be done with 301 for permanent or other redirect codes.
if ($request_uri ~* "^(.*/)index\.php(.*)") {
return 307 $1$2;
}
test URL
original image:
https://www.spare-wheel.com/sites/default/files/media/2020-Nissan-Juke-suv-a05.jpg
thumb image
https://www.spare-wheel.com/sites/default/files/styles/large/public/media/2020-Nissan-Juke-suv-a05.jpg
gtmetrix screenshot
https://prnt.sc/t44vrs
I really don't understand your question 🙁