# --------------------- # OPTIMIZATIONS.CONF # --------------------- location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|woff|woff2)$ { access_log off; log_not_found off; expires max; } location ~* \.(js|css)$ { expires 30d; } # ------------------- # WP-SUPER-CACHE.CONF # ------------------- # WP Super Cache Directives # This location context at the end of this file is IMPORTANT # Comment Out or Remove Existing try_files directive from your site(s) config file. # Replace with the include file directive and include the directives in this file. # These three lines in your site(s) config file will change. # # location / { # try_files $uri $uri/ /index.php?$args; # } # # The above will change to the following: # # include global/wp-super-cache.conf set $cache_uri $request_uri; if ($request_method = POST) { set $cache_uri 'null cache'; } if ($query_string != "") { set $cache_uri 'null cache'; } 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|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") { set $cache_uri 'null cache'; } location / { try_files /wp-content/cache/supercache/$http_host/$cache_uri/index-https.html $uri $uri/ /index.php?$args ; }