• So I’ve tested the two below codes in my .htaccess:

    1. Produces a 200 OK redirect finally

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    2. Produces a 200 OK redirect finally as well

    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    I’ve used a redirect checker here: https://www.urlitor.com/ to check the URL and it states that it is a 200 redirect finally to HTTPS.

    What is the correct code for .htaccess?

    My site is www.inkth.com

    There’s also an unidentifiable error which makes the site redirect to the www.inkth.com/register page for some users on certain devices, I’ve noticed.

    Is there anyway to fix this?

    I’m using Google experiments if that may be the issue.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘200 OK redirect instead of 301 redirect (.htaccess)’ is closed to new replies.