<div dir="ltr"><div>Hi,</div><div><br></div><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 7, 2020 at 8:08 PM Francis Daly <<a href="mailto:francis@daoine.org">francis@daoine.org</a>> wrote:<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">$1 may not mean what you want it to mean, when more than one regex-thing<br>is involved. And "map" can be a regex-thing.<br><br>
If you change the location regex to whatever your engine's version of<br>
"save this in a named variable" is, then use that named variable in the<br>
try_files line, you may have better luck.<br>
<br>
Perhaps:<br>
<br>
location ~ ^/imgs/(?P<numbers>[0-9]*)/(.*)$ {<br>
<br>
and use $numbers instead of $1.<br>
<br>
When nginx needs to know the value of $webp_suffix, the "map" is used,<br>
which messes with your $1.<br>
<br>
Then when nginx substitutes in the value of $1, it is not what it was<br>
from the regex location.<br>
<br>
So it all Just Works when $webp_suffix does not need to be read.<br>
<br></blockquote><div><br></div><div>T<span class="gmail-tlid-translation gmail-translation" lang="en"><span title="" class="gmail-">his is exactly the problem! Thank you!</span></span></div><div><span class="gmail-tlid-translation gmail-translation" lang="en"><span title="" class="gmail-"><br></span></span></div><div><span class="gmail-tlid-translation gmail-translation" lang="en"><span title="" class="gmail-">Regards,<br></span></span></div><div><span class="gmail-tlid-translation gmail-translation" lang="en"><span title="" class="gmail-">Marcin Wanat<br></span></span>
</div></div></div></div>