Hi, I am administrating many wordpress MU site with very heavy traffic.
I typically work on Ubuntu+Nginx+PHP FastCGI+Wordpress+Wp-Super Cache and I am really impressed with overall performance.
Now some sites are growing more and more, and I guess replacing "Wp-Super-Cache" with "W3 Total Cache" will be a big added bonus.
My biggest problem is that "W3 Total Cache" does not provides nginx rewrite rules and their apache rewrite rules are bit complex for me.
Can anyone help me out migrating following apache .htaccess rules to nginx config?
[code]
# BEGIN W3 Total Cache
<IfModule mod_setenvif.c>
SetEnvIfNoCase Host ^(www\.)?([a-z0-9\-\.]+\.[a-z]+)\.?(:[0-9]+)?$ DOMAIN=$2
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/rtcamp.com/wp-content/w3tc-%{ENV:DOMAIN}/pgcache/$1/_default_.html%{ENV:APPEND_EXT} -f
RewriteRule (.*) wp-content/w3tc-%{ENV:DOMAIN}/pgcache/$1/_default_.html%{ENV:APPEND_EXT} [L]
</IfModule>
# END W3 Total Cache
[/code]
I never encountered apache's mod_setenvif in my life so I am really clueless about its nginx counterpart as well.
Any hint for above .htaccess rules?
Thanks all,
-Rahul
--
Rahul Bansal
EasyEngine - https://github.com/rtCamp/easyengine