1

I am using WP Fastest Cache plugin for my HTTPS website. The plugin once activated adds several lines of code to the htaccess file. I doubt the presence of RewriteCond %{HTTPS} !=on in the below segment. Do these lines mean HTTPS urls will not be cached? Is this is a configuration issue on the side of the plugin?

RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} !(\/){2}$
RewriteCond %{REQUEST_URI} \/$
RewriteCond %{QUERY_STRING} !.+
RewriteCond %{HTTP:Cookie} !comment_author_
RewriteCond %{HTTP:Cookie} !woocommerce_items_in_cart
RewriteCond %{HTTP:Cookie} !safirmobilswitcher=mobil
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/all/$1/index.html -f 
RewriteRule ^(.*) "/wp-content/cache/all/$1/index.html" [L]

closed as off-topic by Mark Kaplun, Jacob Peattie, TheDeadMedic, Jack Johansson Aug 11 '18 at 14:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • this is not a wordpress development question, but a generic htaccess question, for which a different stack will be a better place to ask. But obviously it would be way better to just ask the plugin's author – Mark Kaplun Aug 8 '18 at 13:16
  • But I could see several questions pertaining to plugins on this stack. Moreover, already I have raised a query with the plugin author but haven't got a reply from the author so far. Hence, my thought was to debug myself based on responses I get from stack. Kindly advise. – Kannan Aug 8 '18 at 13:46
  • Ok, now I have added a specific query focusing only on htaccess part in webmasters stack. That should be fine I think. – Kannan Aug 8 '18 at 14:13
1

Do these lines mean HTTPS urls will not be cached?

Well, it certainly means that on most servers that have an SSL cert installed, the URL will not be rewritten to /wp-content/cache/all/<requested-URL-path>/index.html. If that means the cache will be bypassed, then yes, it prevents caching.

The idea of not caching HTTPS requests would seem to be very outdated.

However, the WP Fastest Cache plugin page does include "SSL support" as one of its features and further down the page explicitly states: "Yes, it is compatible with Http Secure (https).". So, there is perhaps more to this than that presented here?

WP support query posted by the OP (currently unanswered): https://wordpress.org/support/topic/use-of-rewritecond-https-on/

  • 1
    Yes, I am waiting for the plugin author to respond on the WordPress support. As of now, the only logical conclusion seems HTTPS pages are handled in PHP and not at MOD_REWRITE. I wonder if there is any specific reason for different approaches for HTTP and HTTPS pages. – Kannan Aug 8 '18 at 19:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.