Title: pbre's Replies | WordPress.org

---

# pbre

  [  ](https://wordpress.org/support/users/pbre/)

 *   [Profile](https://wordpress.org/support/users/pbre/)
 *   [Topics Started](https://wordpress.org/support/users/pbre/topics/)
 *   [Replies Created](https://wordpress.org/support/users/pbre/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/pbre/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/pbre/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/pbre/engagements/)
 *   [Favorites](https://wordpress.org/support/users/pbre/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/users/pbre/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/pbre/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin] Always hide field until Condition matches](https://wordpress.org/support/topic/always-hide-field-until-condition-matches/)
 *  Thread Starter [pbre](https://wordpress.org/support/users/pbre/)
 * (@pbre)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/always-hide-field-until-condition-matches/#post-16827974)
 * Edit: My workaround is limited due to the 5 condition rules restriction…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LiteSpeed Cache] PHP Notice: Array to string conversion](https://wordpress.org/support/topic/php-notice-array-to-string-conversion-11/)
 *  Thread Starter [pbre](https://wordpress.org/support/users/pbre/)
 * (@pbre)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/php-notice-array-to-string-conversion-11/#post-16056419)
 * to be correct [@qtwrk](https://wordpress.org/support/users/qtwrk/) it’s PHP 7.4.30
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LiteSpeed Cache] PHP Notice: Array to string conversion](https://wordpress.org/support/topic/php-notice-array-to-string-conversion-11/)
 *  Thread Starter [pbre](https://wordpress.org/support/users/pbre/)
 * (@pbre)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/php-notice-array-to-string-conversion-11/#post-16055801)
 * PHP 7.4
    WP 6.0.2
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[CAOS | Host Google Analytics Locally] Compatibility with PixelYourSite](https://wordpress.org/support/topic/compatibility-with-pixelyoursite-2/)
 *  [pbre](https://wordpress.org/support/users/pbre/)
 * (@pbre)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/compatibility-with-pixelyoursite-2/#post-15934780)
 * [@alpha966123](https://wordpress.org/support/users/alpha966123/) have you tried
   to flush/purge your serverside/onsite cache?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Redirection] Redirection Plugin – .htaccess path: With or without .htaccess? | LiteSpeed](https://wordpress.org/support/topic/redirection-plugin-htaccess-path-with-or-without-htaccess-litespeed/)
 *  Thread Starter [pbre](https://wordpress.org/support/users/pbre/)
 * (@pbre)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/redirection-plugin-htaccess-path-with-or-without-htaccess-litespeed/#post-15932449)
 * Thanks [@johnny5](https://wordpress.org/support/users/johnny5/)
    regarding 1)
   okay, thanks! 2) Any existing rules will remain – sure. Would the plugin automatically
   replace the rules from the DB and write it to the htaccess file and afterewards
   delete the rules from the DB? 3) Found one: On some OLS servers you have to reboot
   the server or restart LSWS [https://www.basezap.com/htaccess-changes-openlitespeed-web-server/](https://www.basezap.com/htaccess-changes-openlitespeed-web-server/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LiteSpeed Cache] LiteSpeed Crawler: Cookie Notice – Question](https://wordpress.org/support/topic/litespeed-crawler-cookie-notice-question/)
 *  Thread Starter [pbre](https://wordpress.org/support/users/pbre/)
 * (@pbre)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/litespeed-crawler-cookie-notice-question/#post-15919979)
 * Question on top of the discussed above:
 * Can I ouput ONE cached page if two cookies are set?
    For example: I want to be
   extra sure about the cookies
 *     ```
       CookieLawInfoConsent
       viewed_cookie_policy
       ```
   
 * –> If BOTH cookies are set, then output ONE cached version
    ((These are just 
   imagined rules, not real rules! – for those who came here from Google for copy
   and pasting stuff)) – so something like: `RewriteRule .* - [E="cache-vary:CookieLawInfoConsent
   + viewed_cookie_policy"]` or `RewriteRule .* - [E="cache-vary:CookieLawInfoConsent&&
   viewed_cookie_policy"]`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LiteSpeed Cache] LiteSpeed Crawler: Cookie Notice – Question](https://wordpress.org/support/topic/litespeed-crawler-cookie-notice-question/)
 *  Thread Starter [pbre](https://wordpress.org/support/users/pbre/)
 * (@pbre)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/litespeed-crawler-cookie-notice-question/#post-15919917)
 * To sum it up:
    1) The comma is for multiple cookies – clear, thanks! ✅ 2) Cookies
   like `CookieLawInfoConsent` are case sensitive so it’s NOT `RewriteRule .* - [
   E=Cache-Vary:cookielawinfoconsent]` it is `RewriteRule .* - [E=Cache-Vary:CookieLawInfoConsent]`
 * And:
    `RewriteRule .* - [E=cache-vary:xxx]` can also be written like `RewriteRule.*-[
   E=Cache-Vary:xxx]` ✅ 3) The short `RewriteRule .* - [E="cache-vary:xf_style_id,
   xf_language_id"]` **is equal to / is technically the same like**
 *     ```
       RewriteRule .* - [E=cache-vary:xf_style_id]
       RewriteRule .* - [E=cache-vary:xf_language_id]
       ```
   
 * Both rulesets create a different cashed page depending on the set cookie and 
   the cookie value. ✅
 * So far correct?
 * **An addon question regarding OLS and cache-vary:**
    In OpenLiteSpeed, is it 
   enough to edit the .htaccess or do I have to edit the Headers as well?
    -  This reply was modified 3 years, 12 months ago by [pbre](https://wordpress.org/support/users/pbre/).
    -  This reply was modified 3 years, 12 months ago by [pbre](https://wordpress.org/support/users/pbre/).
    -  This reply was modified 3 years, 12 months ago by [pbre](https://wordpress.org/support/users/pbre/).
      Reason: text beautified
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LiteSpeed Cache] Cookie is not set when the site is entered with the utm parameter](https://wordpress.org/support/topic/cookie-is-not-set-when-the-site-is-entered-with-the-utm-parameter/)
 *  [pbre](https://wordpress.org/support/users/pbre/)
 * (@pbre)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/cookie-is-not-set-when-the-site-is-entered-with-the-utm-parameter/#post-15918635)
 * Have you tried to check
    – to clear the cache after changes? – used private mode
   with 3rd party cookies accepted without adblocking / PiHole / DNS / VPN with 
   adblocking features? – whether you or one of your collegues have excluded that
   cookie? – if the cookie is set while disable all features or disable the LS Plugin?
 * don’t know if this fits in this case… tried to vary the cache?
    [https://docs.litespeedtech.com/lscache/devguide/advanced/](https://docs.litespeedtech.com/lscache/devguide/advanced/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LiteSpeed Cache] LiteSpeed Crawler: Cookie Notice – Question](https://wordpress.org/support/topic/litespeed-crawler-cookie-notice-question/)
 *  Thread Starter [pbre](https://wordpress.org/support/users/pbre/)
 * (@pbre)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/litespeed-crawler-cookie-notice-question/#post-15918055)
 * Okay, understood.
    Thanks again [@qtwrk](https://wordpress.org/support/users/qtwrk/)!
   🙂
 * Regarding the “comma rule”, I found it inside the docs as well at the second 
   example, but the rule
    – is inside quotation marks – is written lower case, like
   the word combination `cache-var` – isn’t documented indepth what it does (like:“
   Only if a and b matches, than cache the page.” Or “If a OR b matches, then cache
   the page”…) [https://docs.litespeedtech.com/lscache/devguide/advanced/#rewrite-rules](https://docs.litespeedtech.com/lscache/devguide/advanced/#rewrite-rules)
 * Would you mind to ask your team about that?
 * An addon question regarding OLS and cache-vary:
    In OpenLiteSpeed, is it enough
   to edit the .htaccess or do I have to edit the Headers as well?
    -  This reply was modified 3 years, 12 months ago by [pbre](https://wordpress.org/support/users/pbre/).
    -  This reply was modified 3 years, 12 months ago by [pbre](https://wordpress.org/support/users/pbre/).
    -  This reply was modified 3 years, 12 months ago by [pbre](https://wordpress.org/support/users/pbre/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LiteSpeed Cache] LiteSpeed Crawler: Cookie Notice – Question](https://wordpress.org/support/topic/litespeed-crawler-cookie-notice-question/)
 *  Thread Starter [pbre](https://wordpress.org/support/users/pbre/)
 * (@pbre)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/litespeed-crawler-cookie-notice-question/#post-15917997)
 * Thanks again [@qtwrk](https://wordpress.org/support/users/qtwrk/) that you enlighten
   me with your wisdom 🙂
 * Let’s say I would create a one-for-all htaccess file with a collection of Cookie/
   Cache-Vary and there are cookies inside the htaccess that would never be used.
   
   Would this have a negative impact on speed/stability, cache hits and/or would
   this result into errors?
 * The logic behind this is to safe time and redundant work to not scan every site
   moved to LiteSpeed for the corresponding cookie.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LiteSpeed Cache] If I write a RewriteRule – does it have to be inside brackets?](https://wordpress.org/support/topic/if-i-write-a-rewriterule-does-it-have-to-be-inside-brackets/)
 *  Thread Starter [pbre](https://wordpress.org/support/users/pbre/)
 * (@pbre)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/if-i-write-a-rewriterule-does-it-have-to-be-inside-brackets/#post-15917223)
 * Thanks [@qtwrk](https://wordpress.org/support/users/qtwrk/) !
    I Would appreciate
   if you would add this to the KB or the standard .htaccess 🙂
 * Something like:
 *     ```
       # ADD YOUR CUSTOM RULES HERE (LIKE CACHE-VARY)
       ## HAVE A LOOK AT THE DOCS: https://docs.litespeedtech.com/lscache/devguide/advanced/
       <IfModule LiteSpeed>
       RewriteEngine On
       # YOUR RULE HERE
       </IfModule>
   
       <IfModule LiteSpeed>
       # BEGIN LSCACHE
       ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
       <IfModule LiteSpeed>
       RewriteEngine on
       CacheLookup on
       RewriteRule .* - [E=Cache-Control:no-autoflush]
       RewriteRule \.litespeed_conf\.dat - [F,L]
   
       ...
       </IfModule>
       ```
   
    -  This reply was modified 3 years, 12 months ago by [pbre](https://wordpress.org/support/users/pbre/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LiteSpeed Cache] LiteSpeed Crawler: Cookie Notice – Question](https://wordpress.org/support/topic/litespeed-crawler-cookie-notice-question/)
 *  Thread Starter [pbre](https://wordpress.org/support/users/pbre/)
 * (@pbre)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/litespeed-crawler-cookie-notice-question/#post-15917197)
 * Based on the questions above:
 * If I vary a cookie
    1. Is the rule for the cookie nane case-sensitive? like `
   RewriteRule .* - [E=Cache-Vary:CookieLawInfoConsent]` or `RewriteRule .* - [E
   =Cache-Vary:cookielawinfoconsent]` 2. Is there a way to visually “see” and/or
   check the results of a vary rule like a screenshot of a page? 3. What does the
   comma do? I saw it here: [https://github.com/WpSpeedDoctor/litespeed-cookie-based-caching/blob/main/htaccess.txt](https://github.com/WpSpeedDoctor/litespeed-cookie-based-caching/blob/main/htaccess.txt)(
   line 23) is it like AND / OR / XOR?
    -  This reply was modified 3 years, 12 months ago by [pbre](https://wordpress.org/support/users/pbre/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LiteSpeed Cache] LiteSpeed Crawler: Cookie Notice – Question](https://wordpress.org/support/topic/litespeed-crawler-cookie-notice-question/)
 *  Thread Starter [pbre](https://wordpress.org/support/users/pbre/)
 * (@pbre)
 * [4 years ago](https://wordpress.org/support/topic/litespeed-crawler-cookie-notice-question/#post-15908112)
 * Hi [@qtwrk](https://wordpress.org/support/users/qtwrk/)
    The site’s using the
   Plugin GDPR Cookie Consent [https://wordpress.org/plugins/cookie-law-info/](https://wordpress.org/plugins/cookie-law-info/)
 * The Cookie following cookies gets pre-set from this plugin on a pageview:
 *     ```
       cookielawinfo-checkbox-non-necessary
       cookielawinfo-checkbox-necessary
       ```
   
 * This cookie will be set after accepting the Cookie Consent:
 *     ```
       CookieLawInfoConsent
       viewed_cookie_policy
       ```
   
 * 1. So to vary the cookie and cache different sites “states” based on cookies 
   it would be like this inside the .htaccess file, right?:
 *     ```
       <IfModule LiteSpeed>
       RewriteEngine On
       RewriteRule .* - [E=CookieLawInfoConsent]
       RewriteRule .* - [E=viewed_cookie_policy]
       </IfModule>
       ```
   
 * 2. Is the order of the loaded Cookies important?
    3. Can I shorten the cookie
   string like this to eliminate a line (or what does the comma do)? `RewriteRule.*-[
   E=CookieLawInfoConsent,viewed_cookie_policy]`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LiteSpeed Cache] If I write a RewriteRule – does it have to be inside brackets?](https://wordpress.org/support/topic/if-i-write-a-rewriterule-does-it-have-to-be-inside-brackets/)
 *  Thread Starter [pbre](https://wordpress.org/support/users/pbre/)
 * (@pbre)
 * [4 years ago](https://wordpress.org/support/topic/if-i-write-a-rewriterule-does-it-have-to-be-inside-brackets/#post-15907908)
 * Thanks for your help [@qtwrk](https://wordpress.org/support/users/qtwrk/) ! I
   really appreciate it 🙂
 * One short question – just to be sure:
    There will be not conflicts of having 
   two `<IfModule LiteSpeed>...</IfModule>` brackets and/or LiteSpeed won’t delete
   the custom lines, right?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LiteSpeed Cache] If I write a RewriteRule – does it have to be inside brackets?](https://wordpress.org/support/topic/if-i-write-a-rewriterule-does-it-have-to-be-inside-brackets/)
 *  Thread Starter [pbre](https://wordpress.org/support/users/pbre/)
 * (@pbre)
 * [4 years ago](https://wordpress.org/support/topic/if-i-write-a-rewriterule-does-it-have-to-be-inside-brackets/#post-15905429)
 * So it would be on top of the .htaccess, right?
 *     ```
       <IfModule LiteSpeed>
       RewriteEngine On
       RewriteRule .* - [E=Cache-Vary:woocommerce_current_currency]
       RewriteRule .* - [E=Cache-Vary:wp-wpml_current_language]
       </IfModule>
       ```
   
 * and afterwards comes the standard LiteSpeed rules
 *     ```
       <IfModule LiteSpeed>
       # BEGIN LSCACHE
       ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
       <IfModule LiteSpeed>
       RewriteEngine on
       CacheLookup on
       RewriteRule .* - [E=Cache-Control:no-autoflush]
       RewriteRule \.litespeed_conf\.dat - [F,L]
   
       ...
       </IfModule>
       ```
   
 * So it would be
 *     ```
       <IfModule LiteSpeed>
       RewriteEngine On
       RewriteRule .* - [E=Cache-Vary:woocommerce_current_currency]
       RewriteRule .* - [E=Cache-Vary:wp-wpml_current_language]
       </IfModule>
   
       <IfModule LiteSpeed>
       # BEGIN LSCACHE
       ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
       <IfModule LiteSpeed>
       RewriteEngine on
       CacheLookup on
       RewriteRule .* - [E=Cache-Control:no-autoflush]
       RewriteRule \.litespeed_conf\.dat - [F,L]
   
       ...
       </IfModule>
       ```
   
 * Correct?
    -  This reply was modified 4 years ago by [pbre](https://wordpress.org/support/users/pbre/).

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/users/pbre/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/pbre/replies/page/2/?output_format=md)