Skip to content

Instantly share code, notes, and snippets.

@bajpangosh
Created March 13, 2019 05:47
Show Gist options
  • Save bajpangosh/e02b041ca404329ddc9c12772822a239 to your computer and use it in GitHub Desktop.
Save bajpangosh/e02b041ca404329ddc9c12772822a239 to your computer and use it in GitHub Desktop.
Nginx Rewrites for Rank Math Sitemaps
# START Nginx Rewrites for Rank Math Sitemaps
rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
# END Nginx Rewrites for Rank Math Sitemaps
@sooryakiransv
Copy link

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment