We have it enabled on more blogs, just ignore the mod_rewrite Warning, enable gzip_static.
#wenn file existiert gleich anzeigen
if (-f $request_filename) {
break;
}
set $supercache_file '';
set $supercache 1;
set $supercache_uri $request_uri;
set $ihttp_host '';
if ($request_method = POST) {
set $supercache 0;
}
# Using pretty permalinks, so bypass the cache for any query string
set $qs 0;
if ($query_string) {
set $qs 1;
}
#supercaching when coming from twitter, facebook, feedburner
if ($query_string ~* "^utm_source=([^&]+)&utm_medium([^&]+)&utm_campaign=([^&]+)(&utm_content=([^&]+))?$") {
set $qs 0;
set $supercache_uri $document_uri;
}
#set $qs 1;
#if querystring test not passed, not caching
#deactivate on high load
if ($qs = 1) {
set $supercache 0;
}
#deactivate it on high traffic
if ($http_cookie ~* "comment_author_|wordpress|wp-postpass_" ) {
set $supercache 0;
}
#mobile device support
#RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mob)$
#RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|)$
#if ($http_user_agent ~* '^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mob)$') {
# set $supercache 0;
#}
#if ($http_user_agent ~* '^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|)$') {
# set $supercache 0;
#}
if ($http_user_agent ~* '(iphone|ipod|aspen|incognito|webmate|android|dream|cupcake|froyo|blackberry9500|blackberry9520|blackberry9530|blackberry9550|blackberry 9800|webos|s8000|bada)') {
# set $ihttp_host '-mobile';
set $supercache 0;
}
# if we haven't bypassed the cache, specify our supercache file
if ($supercache = 0 ) {
set $supercache_uri '';
}
if ($supercache_uri ~ ^(.+)$) {
set $supercache_file /wp-content/cache/supercache/$http_host$1/index${ihttp_host}.html;
}
# only rewrite to the supercache file if it actually exists
if (-f $document_root$supercache_file) {
rewrite ^ $supercache_file last;
# rewrite ^(.*)$ $supercache_file last;
}