Rewrite rules (redirect subdomain to complex path of main domain)

Hello,

I'm running NextCloud. For simplicity reasons, I have a subdomain "caldav.example.org" which an nginx reverse proxy resolves to "www.example.org/remote.php/dav/calendars/username/". The username is automatically taken from the user name supplied with HTTP Basic authentication. For any calendar app, it's then sufficient to point it to "caldav.example.org" without providing any path.

Now I'm wondering whether I could get rid of the additional nginx instance and let Traefik do the same. From what I've read so far, I'm not sure whether or not this is possible, so I'd appreciate some help.