RedirectMatch supports PCRE-style regex syntax, so you could do something like
RedirectMatch 301 ^(?!/\.well-known/acme-challenge/).* https://mydomain.example$0
RedirectMatch supports PCRE-style regex syntax, so you could do something like
RedirectMatch 301 ^(?!/\.well-known/acme-challenge/).* https://mydomain.example$0