RewriteCond %{HTTP_HOST} !^www.example.co.uk$ [NC]
RewriteRule ^(.*)$ https://www.example.co.uk/$1 [R=301,QSA,L]
thats for the www, but I cannot figure out in a one-pass way how to force the https too?
RewriteCond %{HTTP_HOST} !^www.example.co.uk$ [NC]
RewriteRule ^(.*)$ https://www.example.co.uk/$1 [R=301,QSA,L]
thats for the www, but I cannot figure out in a one-pass way how to force the https too?
Use the SERVER_PROTOCOL variable:
RewriteCond ${SERVER_PROTOCOL} !^https [NC]