# Redirect all requests to http://www.domain.com if they are not yet RewriteCond "%{HTTP_HOST}" "!^www.domain.com$" [NC] RewriteCond %{HTTPS} !=on RewriteRule "(.*)" "http://www.domain.com$1" [R,L] RewriteCond "%{HTTP_HOST}" "!^www.domain.com$" [NC] RewriteCond %{HTTPS} !=off RewriteRule "(.*)" "https://www.domain.com$1" [R,L]