For these kind of redirections, since we are changing the host string, we cannot use the %h variable, and therefore, you will have to use static url redirections.
Also, you should take into account that, if you need to do redirections from https://www.mydomain.co.uk to https://www.mydomain.com, you will also need to have SSL termination in place, otherwise, the ACE would not be able to parse the request.