I fixed the double `%%`, this was a left over when migrating from Lighttpd to Nginx recently. Sorry about that.
Could you test whether it works now? I spend the last hour in testing and trying various things while it should work as it is. Currently, a clean 301 status is returned with the appropriate `Location` header and this is the same as before. For some reason, when testing with my Firefox instance, I always get an error but this must be related to its history. I tested with fresh profiles in Chromium and Firefox and then it seems to work.