skip to Main Content

No matter what, I keep getting “ERR_TOO_MANY_REDIRECTS”. Is there a “proper” way to redirect all http requests to https? (other than the five listed below…)

I have this:

<VirtualHost *:80>
ServerName example.com
Redirect permanent / https://example.com/
</VirtualHost>

I also tried the top four answers in this article: http to https apache redirection. Nothing works, all infinite redirects.

2

Answers


  1. Chosen as BEST ANSWER

    My problem was a WordPress plugin...

    Solution: Set Paid Memberships Pro Stripe Gateway "force SSL" setting to "No"

    Considerations that got me here: 1. EVERY suggestion for configs works, my config files work on nearly 100 sites I manage. 2. I have a near-identical WP site to this and it works. 3. I started re-activating plugins one by one.

    The problem I found:

    On first activation, Paid Memberships Pro detects http or https, then permanently disables "force SSL" setting on an https site. My working site had this happen, so no problem. My broken site had PMP installed on http, then I got the SSL cert later. SSL (Yes via JavaScript) created a non-breaking redirect loop. Turning off "force SSL" did the trick.

    Moral of my story: When using WP, deactivate plugins before asking for help.


  2. Please try following:

    RewriteEngine on
    RewriteCond %{SERVER_PORT} !^443$
    RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L]
    

    As others said, If you share you config file, it would be more easy to answer. Probably, some config cause a loop.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search