• WP Fastest Cache 1.5.2, PHP 8.3, Apache behind nginx (ISPmanager shared hosting; nginx terminates TLS and proxies to Apache over HTTP), Cloudflare in front.

    Every cached page ends with <!-- via php -->, and the time to first byte stays at 0.4–0.9 s. The .htaccess rules never match, because the first condition is:

    RewriteCond %{HTTPS} on

    Behind a proxy that terminates TLS, Apache sees the connection as plain HTTP, so %{HTTPS} is off, even though the visitor uses HTTPS. The proxy does send X-Forwarded-Proto: https.

    Workaround: this change makes Apache serve the cache directly (TTFB dropped to about 80 ms):

    RewriteCond %{HTTPS} on [OR]
    RewriteCond %{HTTP:X-Forwarded-Proto} https

    But WP Fastest Cache overwrites it whenever the settings are saved.

    Request: could the generated rules also accept %{HTTP:X-Forwarded-Proto} https (and perhaps %{HTTP:X-Forwarded-SSL} on), or offer a setting for it? This setup is common on shared hosting and behind Cloudflare with Flexible SSL.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.