I want to redirect from any direction to our site with HTTPS protocol, but some redirects it\'s not working. I want this:
http://www.site.co
TO
This is http to https and non www to www redirection using .htaccess
If you want to redirect to https and www you can use this code
http to https redirection:
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
Non www to www redirection:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
If you want to use booth functionality place the above all code respectively