how to redirect http to https using 301 instead 302 ?
-
Recently , I’ve successfully redirect my site from http to https (SSL) , but my site’s redirect using 302 .
>>> https://ngelag.com > -------------------------------------------- > 302 Found > -------------------------------------------- Status: 302 Found Code: 302 Date: Sun, 14 Feb 2016 03:09:56 GMT Server: Apache Location: https://ngelag.com/ Cache-Control: max-age=31536000 Expires: Mon, 13 Feb 2017 03:09:56 GMT Content-Length: 203 Connection: close Content-Type: text/html; charset=iso-8859-1 >>> https://ngelag.com/ > -------------------------------------------- > 200 OK > -------------------------------------------- Status: 200 OK Code: 200 Date: Sun, 14 Feb 2016 03:09:57 GMT Server: Apache X-Powered-By: PHP/5.3.29 Link: <https://ngelag.com/wp-json/>; rel="https://api.w.org/" Vary: Accept-Encoding,User-Agent Cache-Control: max-age=31536000 Expires: Mon, 13 Feb 2017 03:09:57 GMT Connection: close Content-Type: text/html; charset=UTF-8
i like to move my site permanently to https:// (301) how to do this ?
I’ve tried using these code , but the result still redirecting my site using 302 .
RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]
am i doing it wrong ? how to redirect http to https using 301 instead 302 ?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘how to redirect http to https using 301 instead 302 ?’ is closed to new replies.