Quantcast
Channel: wp-super-cache – WordPress.org Forums
Viewing all articles
Browse latest Browse all 3480

Stefan on "Wp Super Cache serve non-cache to specific User Agent?"

$
0
0

This is what I've tried so far and didn't work, don't know why because it seems right:

RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
# ADDED THIS LINE TO PASS-THROUGH USER AGENTS
RewriteCond %{HTTP_USER_AGENT} !(Googlebot|Google|Adsense)
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz [L]

RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
# ADDED THIS LINE TO PASS-THROUGH USER AGENTS
RewriteCond %{HTTP_USER_AGENT} !(Googlebot|Google|Adsense)
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html [L]

Viewing all articles
Browse latest Browse all 3480

Trending Articles