Advertisement
Pothi

W3 Total Cache - Disk-Enhanced Page Caching

Sep 3rd, 2013
123
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # BEGIN W3TC Page Cache cache
  2. location ~ /wptest/wp-content/cache/page_enhanced.*html$ {
  3. add_header X-Powered-By "W3 Total Cache/0.9.3";
  4. add_header Vary "Accept-Encoding, Cookie";
  5. }
  6. location ~ /wptest/wp-content/cache/page_enhanced.*gzip$ {
  7. gzip off;
  8. types {}
  9. default_type text/html;
  10. add_header X-Powered-By "W3 Total Cache/0.9.3";
  11. add_header Vary "Accept-Encoding, Cookie";
  12. add_header Content-Encoding gzip;
  13. }
  14. # END W3TC Page Cache cache
  15. # BEGIN W3TC Browser Cache
  16. gzip on;
  17. gzip_types text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;
  18. location ~ \.(css|htc|js|js2|js3|js4)$ {
  19. add_header X-Powered-By "W3 Total Cache/0.9.3";
  20. }
  21. location ~ \.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml)$ {
  22. add_header X-Powered-By "W3 Total Cache/0.9.3";
  23. }
  24. location ~ \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ {
  25. add_header X-Powered-By "W3 Total Cache/0.9.3";
  26. }
  27. # END W3TC Browser Cache
  28. # BEGIN W3TC Page Cache core
  29. set $w3tc_rewrite 1;
  30. if ($request_method = POST) {
  31. set $w3tc_rewrite 0;
  32. }
  33. if ($query_string != "") {
  34. set $w3tc_rewrite 0;
  35. }
  36. if ($request_uri !~ \/$) {
  37. set $w3tc_rewrite 0;
  38. }
  39. if ($http_cookie ~* "(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in)") {
  40. set $w3tc_rewrite 0;
  41. }
  42. set $w3tc_ssl "";
  43. if ($scheme = https) {
  44. set $w3tc_ssl _ssl;
  45. }
  46. set $w3tc_enc "";
  47. if ($http_accept_encoding ~ gzip) {
  48. set $w3tc_enc _gzip;
  49. }
  50. if (!-f "$document_root/wptest/wp-content/cache/page_enhanced/$http_host/$request_uri/_index$w3tc_ssl.html$w3tc_enc") {
  51. set $w3tc_rewrite 0;
  52. }
  53. if ($w3tc_rewrite = 1) {
  54. rewrite .* "/wptest/wp-content/cache/page_enhanced/$http_host/$request_uri/_index$w3tc_ssl.html$w3tc_enc" last;
  55. }
  56. # END W3TC Page Cache core
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement