HTTP to HTTPS redirect causes ERR_TOO_MANY_REDIRECTS on ngrok

  • | 1325 points

    I activated HTTPS on Laragon, redirecting automatically all HTTP requests to HTTPS through .htaccess:

    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{HTTPS} !=on
        RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

    Everything is fine except when I use ngrok, because I get an ERR_TOO_MANY_REDIRECTS error.
    I tried with some sites (Laravel, Wordpress, custom ones) but I always end with that error...

    I can remove the .htaccess rule, temporarily, but is there a more pleasant solution? Thanks :-)

Log in to reply

Looks like your connection to Laragon was lost, please wait while we try to reconnect.