stuck in this nightmare with an nginx config change for a client. everything looks fine in the browser but logs show a redirect loop specifically for the xml files. tried stripping the trailing slash rule but it didn't fix anything.
location ~* \.xml$ {rewrite ^(.*)/$ $1 permanent;}it's acting like the sitemap is hitting a different block entirely.
>the crawler just sees a 301 loop and gives up. checked the upstream headers and they look clean, so i'm losing my mind. tried testing with curl but even that returns the same mess. turns out the legacy regex in the main server block is catching them too.