• Resolved alfredo1216

    (@alfredo1216)


    Hello,

    On my page I have a currency switcher and it works mainly by storing it in a cookie.

    It happens that in the “LiteSpeed ??Cache” settings it allows me to exclude cookies but with fixed names and the cookie that I want to exclude has a dynamic name with the following structure:

    “wp_woocs_session_70ce9f732d31hfa6f53”

    Is there a way to exclude these cookies by checking that it contains “wp_woocs_session_”?

    I look forward to your comments and thank you.

Viewing 1 replies (of 1 total)
  • Unfortunately, the plugin cannot do this and you have to do it directly in .htaccess. Place the following code on top of the .htaccess and in any case outside the LiteSpeed markers

    RewriteCond %{HTTP_COOKIE} wp_woocs_session_[A-Za-z0-9]+ [NC]
    RewriteRule .* - [E=Cache-Control:no-cache]
Viewing 1 replies (of 1 total)
  • The topic ‘Exclude cookie with dynamic name’ is closed to new replies.