Advertisement
Guest User

Untitled

a guest
Jun 11th, 2011
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement