Your question says ?
but probably mean missing anchor $
from your regex.
rewritecond %{http_host} ^mydomain.com$ [nc]
Even more correct would be:
rewritecond %{http_host} ^mydomain\.com$ [nc]
Since dot can mean anything in regex and literal dot needs to be escaped.
Without $
also it might work but in theory it can match mydomain.comp
also. With $
in place it can only match mydomain.com