.htaccess HTTP_COOKIE not working (Super Cache problem)
-
WP Super Cache is working fine with one little problem for me. The “RewriteCond %{HTTP_COOKIE} !^.*wordpressuser.*$” portion does not seem to be engaging.
When I log into my blog and try to reply to a comment, I do not get the usual “Logged in as…” message. Instead I get the static HTML page out of the cache and I end up removing that page out of the cache to reply as myself.
Which is odd, my wordpressuser_XXXXXXXXXXX cookie is set and the rewrite condition should prevent me from hitting the static version out of /wp-content/cache/supercache/.
I’m betting that there is something basic I’m missing, any help would be appreciated. Aside from HTTP_COOKIE not working, my re-write works fine for my permalinks.
Here is a copy of my .htaccess for reference:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{QUERY_STRING} !.*s=.* RewriteCond %{HTTP_COOKIE} !^.*comment_author_.*$ RewriteCond %{HTTP_COOKIE} !^.*wordpressuser.*$ RewriteCond %{HTTP_COOKIE} !^.*wp-postpass_.*$ RewriteCond %{HTTP:Accept-Encoding} gzip RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1index.html.gz -f RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1index.html.gz [L] RewriteCond %{QUERY_STRING} !.*s=.* RewriteCond %{HTTP_COOKIE} !^.*comment_author_.*$ RewriteCond %{HTTP_COOKIE} !^.*wordpressuser.*$ RewriteCond %{HTTP_COOKIE} !^.*wp-postpass_.*$ RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1index.html -f RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1index.html [L] <IfModule mod_rewrite.c> RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> </IfModule> # END WordPress
Nested IfModule put in by plugin.
Thanks,
Jan Dembowski
- The topic ‘.htaccess HTTP_COOKIE not working (Super Cache problem)’ is closed to new replies.