I'm trying to redirect http://www.anydomain.com/rc to http://webmail.anydomain.com

It needs to work on all virtual domains.

This is what I have so far
RewriteCond %{REQUEST_URI} ^/rc(/?)$ [NC]
RewriteRule ^(.*)$ http://webmail.%{HTTP_HOST} [R=302,L]
This works for http://anydomain.com/rc which is correctly rewritten to http://webmail.anydomain.com

but it doesn't work for http://www.anydomain.com/rc which becomes http://www.webmail.anydomain.com

Can anyone show me how to do this please?

Kind regards,