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 11th, 2011  |  syntax: None  |  size: 1.02 KB  |  views: 96  |  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. # WP Super Cache rules.
  2. # Designed to be included from a 'wordpress-ms-...' configuration file.
  3.  
  4. # Enable detection of the .gz extension for statically compressed content.
  5. # Comment out this line if static gzip support is not compiled into nginx.
  6. gzip_static on;
  7.  
  8. set $supercacheuri "";
  9. set $supercachefile "$document_root/blog/wp-content/cache/supercache/${http_host}${uri}index.html";
  10. if (-e $supercachefile) {
  11.         set $supercacheuri "/blog/wp-content/cache/supercache/${http_host}${uri}index.html";
  12. }
  13.  
  14. # If this is a POST request, pass the request onto WordPress.
  15. if ($request_method = POST) {
  16.         set $supercacheuri "";
  17. }
  18.  
  19. # If there is a query string, serve the uncached version.
  20. if ($query_string) {
  21.         set $supercacheuri "";
  22. }
  23.  
  24. # Logged in users and those who have posted a comment get the non-cached version.
  25. if ($http_cookie ~* comment_author_|wordpress_logged_in|wp-postpass_) {
  26.         set $supercacheuri "";
  27. }
  28.  
  29. # Stop processing if the supercache file is valid.
  30. if ($supercacheuri) {
  31.         rewrite ^ $supercacheuri break;
  32. }
clone this paste RAW Paste Data