Support » Plugin: LiteSpeed Cache » Add extra code in .htaccess

  • Resolved dieter93

    (@dieter93)


    Hi,

    I have a similar problem as described here:
    https://wordpress.org/support/topic/eu-cookie-law-and-litespeed-cache-problem/

    So the following code in the .htaccess should help:
    RewriteRule .* - [E=Cache-Vary:Cookie-NAME]

    But you say in .htaccess: Do not edit the contents of this block!

    What is the best way to add this extra line in the .htaccess?

    Just add it to the .htaccess?
    Or via the Toolbox?

    I’m just wondering, because if I manually enter the line in the .htaccess, will it be overwritten by a future change in the cache settings?

    I like to have a permanent solution.

    Best regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    that post is bit out out-dated

    please add the cache-vary rule at top of your .htaccess

    Best regards,

    dieter93

    (@dieter93)

    Thanks,

    you mean it like this?

    # BEGIN GDPR COOKIE EXCLUDE
    <IfModule LiteSpeed>
    RewriteEngine on
    CacheLookup on
    RewriteRule .* - [E=Cache-Vary:wp_gdpr_cookie_preferences]
    </IfModule>
    # END GDPR COOKIE EXCLUDE
    
    # BEGIN LSCACHE
    ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
    <IfModule LiteSpeed>

    Best regards

    • This reply was modified 3 months ago by dieter93.
    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    yes , add it OUTSIDE of #BEGIN(END) LSCACHE marker

    Best regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.