Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #154621

    s1344678
    Participant

    When I try to redirect using htaccess I get and infinite redirect loop. My wordpress installation seems to have 2 versions. 1 running on the http and the other on https with the same content.

    When I type in my URL using:
    http:// or http://wwww. or www. or plain URL I get redirected to URL.com

    When I type in my URL using:
    https://URL or https://www. I get redirected to https://URL.com.

    What I want is to redirect everything to https://URL.com and use https only. I did change the url’s in general settings. Htaccess results in an infinite redirect and makes my website inaccessible.

    #154624

    s1344678
    Participant

    I contacted my hosting and now solved by adding another rule to htaccess:
    RewriteEngine On
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteRule ^(.*)$ https://DOMAIN.COM/$1 [R=301,L]

    #154960

    Christopher
    Moderator

    Thanks for sharing the solution with others.