Hi- I'm trying to configure WPSuperCache to only serve cached files in the presence of a particular cookie. If that cookie doesn't exist (eg., by default when you get to the site), WP redirects you to an age verification page. If you pass verification, we'll set the cookie that tells SuperCache to serve you cached pages. My cookie's name is "UseCache".
I'm modifying the mod_rewrite rules that SuperCache outputs, but I'm running into some difficulty getting it to work:
RewriteCond %{HTTP_COOKIE} ^UseCache$
This works fine the first time.. no cookies set, nothing in the cache, I get redirected to the validation page. I pass validation and get to the homepage as desired. Now the homepage is cached.
Kill my cookies and my session and come back in, but now I get the cached version of the homepage instead of going through the check again, so the rewrite condition doesn't appear to be working correctly.
This all works fine now without caching.
Any suggestions on how to implement this or where I'm going wrong?
Thanks!
-Rob