I’m trying to redirect visitors to the https://www version of my site. I have looked at several examples and they all differ. Some use *. which I have been told to avoid. Currently I have the following which works fine on redirecting the non-www version to www but if I uncomment the other rules I get a message that there are too many redirects.
RewriteEngine on
#RewriteCond %{SERVER_PORT} !^443$
#RewriteRule .? https://www.domain.eu%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} !^www\.domain\.eu$
RewriteRule .? https://www.domain.eu%{REQUEST_URI} [R=301,L]