Your code, as shown above, will not redirect requests for subdomains. The RewriteCond pattern says, "Match one or more characters starting with or containing anything but a period, followed by a period, followed by and ending with one or more characters which are anything but a period. In other words, only one period is allowed, otherwise the RewriteCond will not match and the rule will not be applied.
You might want to look around in the other config files, as it's possible that another rule is responsible for the unexpected redirection of your subdomains.
There's also one latent defect in the rule above: It could be unexpected defeated by perfectly-valid, but non-canonical requests for FQDNs or domains with appended port numbers -- or both. Ane example would be: [google.com.:80...] which is perfectly-valid, but non-canonical.
This can be handled properly by using two RewriteConds -- one being a modified version of what you already have: