• acolonna

    (@acolonna)


    If you remember, I have already tackled WP SuperCache a while ago, and managed to make it run after some work on the Apache directives.

    I have noticed the latest versions have not received an update to the .htaccess sample.
    There is one rule in particular that prevents WP SuperCache from working for me:

    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$

    When I use this, basically nobody can view the Super Cache, because this condition will return true for 99% of the users (there is a number of cookies WordPress stores, and many contain start with the word “wordpress”).

    The fix I proposed at the time was the following, but since it hasn’t been implemented there must be some issue with it, could you please tell me what it is?

    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$

    The updated rule will finally show Super Cached files to users (and not the legacy Cached files). At least for me! ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter acolonna

    (@acolonna)

    Here it is, have you ever heard of the Cookie “wordpress_test_cookie”? Used by WP to check for Cookie support?
    This will interfere with the Apache rules of WP Super Cache.

    Do you have a login box on your sidebar?

    Thread Starter acolonna

    (@acolonna)

    Hi donncha,

    sorry for the late reply! nope I don’t.
    I have just found out that only a portion of my website pages are served through Super cache, so will have to take all to my development machine and do apache testing from here.

    Well let you know if I manage to collect useful info!

    I think the best solution for this is to add the following line to your wp-config file:

    define('TEST_COOKIE', 'wp_test_cookie');

    This — by renaming the test cookie to a name that does not include the string “wordpress” — will make it so Super Cache doesn’t think you’re logged in when you’re logged out but on a login page.

    Works for me!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WP Super Cache] Am I wrong to say “wordpress” is not good enough to check the Cookies?’ is closed to new replies.