Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # BEGIN W3TC Minify core
- rewrite ^/wp-content/cache/minify.*/w3tc_rewrite_test$ /wp-content/plugins/w3-total-cache/pub/minify.php?w3tc_rewrite_test=1 last;
- set $w3tc_enc "";
- if ($http_accept_encoding ~ gzip) {
- set $w3tc_enc .gzip;
- }
- if (-f $request_filename$w3tc_enc) {
- rewrite (.*) $1$w3tc_enc break;
- }
- rewrite ^/wp-content/cache/minify/(.+\.(css|js))$ /wp-content/plugins/w3-total-cache/pub/minify.php?file=$1 last;
- # END W3TC Minify core
- # BEGIN W3TC Page Cache core
- set $w3tc_rewrite 0;
- if ($request_method = POST) {
- set $w3tc_rewrite 0;
- }
- if ($query_string != "") {
- set $w3tc_rewrite 0;
- }
- if ($request_uri !~ \/$) {
- set $w3tc_rewrite 0;
- }
- # Don't cache uris containing the following segments
- if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
- set $cache_uri 'null cache';
- }
- if ($http_cookie ~* "(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle)") {
- set $w3tc_rewrite 0;
- }
- if ($http_user_agent ~* "(W3\ Total\ Cache/0\.9\.2\.7)") {
- set $w3tc_rewrite 0;
- }
- set $w3tc_enc "";
- if ($http_accept_encoding ~ gzip) {
- set $w3tc_enc "_gzip";
- }
- if (-f "/wp-content/cache/page_enhanced/$http_host/$request_uri/_index.html$w3tc_enc") {
- set $w3tc_rewrite 1;
- }
- if ($w3tc_rewrite = 1) {
- rewrite .* "/wp-content/cache/page_enhanced/$http_host/$request_uri/_index.html$w3tc_enc" last;
- }
- # END W3TC Page Cache core
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement