We bought an SSL certificate, now we're struggeling with the correct redirect in .htaccess. Our current configuration redirects
from http to https,
from "xxz.com" to "xyz.com" and
from "www.xyz.com" to "xyz.com",
so the final output is "https://xyz.com". That's everything fine.

What we're struggeling with is following:
Webmail is accessed by "https://xyz.com/webmail". But when I enter an additional path, like "/webmail", the redirect no longer works.

I tried so many things and finally I hope you can help me.

Here's my code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.xxz.com$ [OR]
RewriteCond %{HTTP_HOST} ^xxz.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.xyz.com/*$
RewriteRule ^(.*)$ http://xyz.com/$1 [R=301,L]
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]