However, this redirects everything. Can anyone see what I’m doing wrong? I suspect it might be my rule patten “(.*)”, but I don’t know how to change/fix this.
%{HTTP_HOST} only contains the host name, nothing else. So it does not (like you seem to assume) contain the schema (http/https) and also does not contain the requested path.
What you need to do is forget about http/https, and spread the host and path over %{HTTP_HOST} and %{REQUEST_URI}, like so
Note that I’ve removed the <IfModule mod_rewrite.c>…</IfModule> since they are quite abusive of the server (why ask for something over and over again when you already know the answer?)
Also, I added [L,R=301] to the last rule to make it a 301 (permanent) redirect instead of the default 302 (temporary).