Quantcast
Channel: WordPress.org Forums » [W3 Total Cache] Support
Viewing all articles
Browse latest Browse all 19282

normadize on "[Plugin: W3 Total Cache] Rewrite rule not catching valid requests for cached files"

$
0
0

Sometimes my browser issues /?= instead of simply /, which results in the query string being empty in both cases. However, the W3TC RewriteCond checks for RewriteCond %{QUERY_STRING} ="" and thus fails on ?=. I recommend using

RewriteCond %{QUERY_STRING} ^=?$

instead.

Also, some performance tips you might want to implement:

- Use ^ instead of .* on RewriteRule
- Use the [OR] operator instead of having multiple rules. For example you can replace

RewriteCond %{HTTPS} =on
    RewriteRule .* - [E=W3TC_SSL:_ssl]
    RewriteCond %{SERVER_PORT} =443
    RewriteRule .* - [E=W3TC_SSL:_ssl]

with

RewriteCond %{HTTPS} =on [OR]
    RewriteCond %{SERVER_PORT} =443
    RewriteRule ^ - [E=W3TC_SSL:_ssl]

https://wordpress.org/plugins/w3-total-cache/


Viewing all articles
Browse latest Browse all 19282

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>