Description : As Google increasingly demands a secure connection from website owners, I'd like to do a 301 redirect in my page's .htaccess file. It is important to not only go from http to https, but also from www to https. Can you paste such .htaccess code for me?
Last Answer : I use this code, I think it's the best solution. [code] RewriteEngine On RewriteCond% {HTTPS} off RewriteRule ^ (. *) $ https: //% {HTTP_HOST}% {REQUEST_URI} [L, R = 301] RewriteCond% {HTTP_HOST} ^ www \. (. +) $ [NC] RewriteRule ^ https: //% 1% {REQUEST_URI} [R = 301, L] [/ code]