SOLVED with this. location /resources { location ~* \.(jpg|jpeg|png|gif|ico|css|js|pdf)$ { if ($request_uri ~ .*%.*) { return 301 https://example.com/resources/weather-documents/historical-rainfall-trends-south-africa_1921_2015.pdf; } if ($request_uri ~ .*[^\x00-\x7F]+.*) { return 301 https://example.com/resources/weather-documents/historical-rainfall-trends-south-afby mitchellkrog - How to...
I get a match with this regex here - https://regex101.com/r/3Lk2zr/3 but then using this location ~ /.*[^\x00-\x7F]+.* { return 444; } still gives me a 404 and not a 444 Likewise I get a match with this - https://regex101.com/r/80KWJ8/1 But then location ~ /.*([^?]*)\%(.*)$ { return 444; } Gives 404 and not 444 ???? I might just aby mitchellkrog - How to...
Hi all, I really hope someone can assist me as I am out of ideas to get a regex working for this location match. I need a location regex to match the following requests and redirect them to the correct location but regex has me totally stumped on this one. The unencoded URL string is: /historical-rainfall-trends-south-africa-1921–2015.pdf The encoded URL string is: /historicaby mitchellkrog - How to...
Thanks Wilfried I will try moving up to 1.12 been meaning to do it and think it's time now. I did eventually trace my current issue with the two CSS files not loading down to an issue with Nginx fastcgi cacheing. I set a nocache rule for the folder that contains those two CSS files and the SPDY error on Chrome went away but I do believe I need to move up to latest stable release.by mitchellkrog - Other discussion
Hi All I am running Nginx 1.10.0 on Ubuntu 16.04 Since last week I am getting ERR_SPDY_PROTOCOL_ERROR loading 2 .css files from my site and it only occurs on Chrome. I tested on Firefox and Safari and do not get these errors. This morning I upgraded Chrome from 58.0.3029.110 > 59.0.3071.86 but still the errors are occurring. Could this be an Nginx 1.10.0 issue? Should I upgrade tby mitchellkrog - Other discussion
Hi there, there are a LOT of very bad nginx bad bot blocker scripts out there. Most of them very badly coded and simply copy and pasted from other people's scripts, which were copy and pasted from other people's scripts. When I started building my own bad bot and bad referer blocker I started with the very same script you came across above, then I came across better one's but to be honest theyby mitchellkrog - How to...