# This rewrite redirects sitemap.xml to sitemap_index.xml, which is what Yoast's WordPress SEO plugin generates.
rewrite ^/sitemap\.xml$ /sitemap_index.xml permanent;
# This rewrite ensures that the styles are available for styling the generated sitemap.
rewrite ^/([a-z]+)?-?sitemap\.xsl$ /index.php?xsl=$1 last;
# These rewrites rule are generated by Yoast's plugin for Nginx webserver
rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;