• The tool https://varvy.com/tools/redirects/ tells me there are 2 redirects, when i check my redirects.

    How to solve this?

    .htaccess coding:

    # HTTPS forced by SG-Optimizer
    <IfModule mod_rewrite.c>
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    </IfModule>
    # END HTTPS
    # BEGIN WordPress
    # The directives (lines) between BEGIN WordPress and END WordPress are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • @jeejoh Redirect timeline according to review of Chrome DevTools (Network tab):

    0. https://dhyannt.com (entered in browser address bar)
    1. https://www.dhyannt.com
    2. https://www.dhyannt.com

    Based on your htaccess, it seems that the redirect from non-www to www is occurring somewhere else, like your host or domain registrar. You can confirm this by removing the rules from htaccess for redirecting non-www to https://www., and see if the redirect continues to occur. Or change the rewrite rule to something very obvious, to see if it’s being applied.

    @jeejoh as crstauf said, you can edit your htaccess:

    Replace RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] by RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Too many HTTP redirects on my website’ is closed to new replies.