This should never happen - you’ve configured /de{uri}/, so it should never strip out the hard-coded /de part. If it is, that’s a bug (and a very weird one at that).
This last slash is pretty useless because {uri} is always at bare minimum a single slash /, or if there’s actually more to the URI, you don’t want to throw a trailing slash after a legitimate file extension.
Now, as for the trailing slashes disappearing - usually the culprit for this kind of behaviour, in the source code, is some path.Clean “cleaning” up the trailing slash. But I can’t see this taking place in the redirect code - it should be setting exactly what you specify directly in the Location header.
Probably because in your case, PHP is listening on /var/run/php/php7.0-fpm.sock, not php:9000.
That was an example Caddyfile, you’d need to change the root and fastcgi directives to suit.
Bit unfortunate about the Digital Ocean community tutorials - DO’s website gives some less-than-accurate instructions a veneer of authenticity, and I think that the whole not_match and the URI query are a case of citogenesis…
Ha, I changed the root directive but of course I did forget changing the php part. It works now without the rewrite part. Yes, I agree with the DO tutorials, however this one seemed to work just fine.
Thanks for clearing that up! Feels better with less clutter …