• Hello, I have a client using the plugin, and no matter what combination of settings we tried, the pages were just never cached (I checked the end of the page markup for that comment which is proof of caching). I checked the changes it did to .htaccess and it seems like there is a potential bug in the code, specifically in the prefixRedirect function from inc/admin.php:

    $forceTo = "\nRewriteCond %{HTTPS} =on"."\n"

    should be:

    $forceTo = "\nRewriteCond %{HTTPS} on"."\n".

    ChatGPT explains it very clearly:

    This is incorrect usage in Apache. It does not evaluate the way the plugin author thinks.

    • Apache sets HTTPS to "on" only if SSL is active, but using =on makes the rewrite condition true only when HTTPS is exactly equal to “on”, which isn’t how it should be checked in .htaccess.
    • Worse, mod_rewrite expects a regex, so =on is not interpreted reliably across servers.

    ✅ Correct Usage:

    Replace:

    RewriteCond %{HTTPS} =on

    With:

    RewriteCond %{HTTPS} on

    I made that change and now the pages are cached. Could you please include this fix in the next releases, so we don’t have to keep manually modify that line after each update? My client also has the paid version of the plugin.

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

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘%{HTTPS} =on syntax is wrong for some servers’ is closed to new replies.