Nginx rewrite rules

The correct Nginx rewrite rules for WordPress are:

location / {
        try_files $uri $uri/ /index.php?q=$uri&$args;
    }

This sends everything through index.php and keeps the appended query string intact.

If your running PHP-FPM you should also add this before your fastcgi_params as a security measure:

location ~ \.php {
        try_files $uri =404;
        
      //  fastcgi_param ....
      //  fastcgi_param ....
      
      fastcgi_pass 127.0.0.1:9000;
}