Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 5th, 2012  |  syntax: None  |  size: 1.70 KB  |  views: 119  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # BEGIN W3TC Page Cache cache
  2. location ~ /wp-content/w3tc/pgcache.*html$ {
  3.     add_header Vary Cookie;
  4. }
  5. # END W3TC Page Cache cache
  6. # BEGIN W3TC Page Cache core
  7. rewrite ^(.*\/)?w3tc_rewrite_test$ $1?w3tc_rewrite_test=1 last;
  8. set $w3tc_rewrite 1;
  9. if ($request_method = POST) {
  10.     set $w3tc_rewrite 0;
  11. }
  12. if ($query_string != "") {
  13.     set $w3tc_rewrite 0;
  14. }
  15. if ($http_host != "mysite.com") {
  16.     set $w3tc_rewrite 0;
  17. }
  18. set $w3tc_rewrite2 1;
  19. if ($request_uri !~ \/$) {
  20.     set $w3tc_rewrite2 0;
  21. }
  22. if ($request_uri ~* "(sitemap(_index)?\.xml(\.gz)?|[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?)") {
  23.     set $w3tc_rewrite2 1;
  24. }
  25. if ($w3tc_rewrite2 != 1) {
  26.     set $w3tc_rewrite 0;
  27. }
  28. set $w3tc_rewrite3 1;
  29. if ($request_uri ~* "(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register|mail)\.php|\/feed\/|wp-.*\.php|index\.php)") {
  30.     set $w3tc_rewrite3 0;
  31. }
  32. if ($request_uri ~* "(wp\-comments\-popup\.php|wp\-links\-opml\.php|wp\-locations\.php)") {
  33.     set $w3tc_rewrite3 1;
  34. }
  35. if ($w3tc_rewrite3 != 1) {
  36.     set $w3tc_rewrite 0;
  37. }
  38. if ($http_cookie ~* "(comment_author|wp\-postpass|wordpress_\[a\-f0\-9\]\+|wordpress_logged_in)") {
  39.     set $w3tc_rewrite 0;
  40. }
  41. if ($http_user_agent ~* "(W3\ Total\ Cache/0\.9\.2\.4)") {
  42.     set $w3tc_rewrite 0;
  43. }
  44. set $w3tc_ua "";
  45. set $w3tc_ref "";
  46. set $w3tc_ssl "";
  47. set $w3tc_enc "";
  48. set $w3tc_ext "";
  49. if (-f "$document_root/wp-content/w3tc/pgcache/$request_uri/_index$w3tc_ua$w3tc_ref$w3tc_ssl.html$w3tc_enc") {
  50.     set $w3tc_ext .html;
  51. }
  52. if ($w3tc_ext = "") {
  53.   set $w3tc_rewrite 0;
  54. }
  55. if ($w3tc_rewrite = 1) {
  56.     rewrite .* "/wp-content/w3tc/pgcache/$request_uri/_index$w3tc_ua$w3tc_ref$w3tc_ssl$w3tc_ext$w3tc_enc" last;
  57. }
  58. # END W3TC Page Cache core