I have a site with security certificate installed at www.abc.com. I am using .htaccess to redirect it to https when a request made with just http.
#RewriteCond %{SERVER_PORT} 80
#RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
What I need is, htaccess should make an attempt to redirect only when requested with http://www.example.com or http://example.com.
It should avoid redirecting when a request is already made with https.