I\'ve the following redirect
RewriteCond %{HTTP_HOST} !^www\\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] RewriteCond %{HTTPS} !on RewriteRule
I'm using this on a Joomla site and it redirects everything to https://www I can't see this solution anywhere else so thought I'd share it
RewriteCond %{HTTP_HOST} ^domainname\.co.uk [NC] RewriteRule ^(.*)$ https://www.domainname.co.uk/$1 [R=301,L]