location / { # This is cool because no php is touched for static content. # include the "?$args" part so non-default permalinks doesn't break when using query string try_files $uri $uri/ /index.php?$is_args$args =404; } if (!-e $request_filename) { rewrite ^.*$ /index.php last; }