Skip to content

Instantly share code, notes, and snippets.

@blister
Created May 6, 2010 20:18
Show Gist options
  • Save blister/392654 to your computer and use it in GitHub Desktop.
Save blister/392654 to your computer and use it in GitHub Desktop.
# BEGIN W3 Total Cache
<IfModule mod_setenvif.c>
SetEnvIfNoCase Accept-Encoding (gzip) APPEND_EXT=.$1
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} \/$
RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register).php|wp-.*\.php|index\.php) [
OR]
RewriteCond %{REQUEST_URI} (wp-comments-popup\.php|wp-links-opml\.php|wp-locations\.php) [NC]
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} =""
RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_\[a-f0-9\]\+|wordpress_logged_in) [NC]
RewriteCond %{HTTP_USER_AGENT} !(bot|ia_archive|slurp|crawl|spider) [NC]
RewriteCond /var/www/vhosts/ericharrison.info/htdocs/wp-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} -f
RewriteRule (.*) wp-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} [L]
</IfModule>
# END W3 Total Cache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
</IfModule>
# BEGIN WordPress
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment