Forum Moderators: phranque
RewriteCond %{USER_AGENT} Googlebot|BingBot
RewriteCond %{SERVER_PORT} ^443$
RewriteRule (.*) http://www.example.com/$1 [R=301,L] RewriteCond %{USER_AGENT} !(Googlebot|BingBot)
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L] RewriteCond %{USER_AGENT} !(Googlebot|BingBot)
RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) https://www.example.com/$1 [R=301,L]