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]