Skip to content

Instantly share code, notes, and snippets.

@zackn9ne
Created October 11, 2012 16:40
Show Gist options
  • Save zackn9ne/3873741 to your computer and use it in GitHub Desktop.
Save zackn9ne/3873741 to your computer and use it in GitHub Desktop.
.htaccess for Yoast XML Sitemaps to Work
# WordPress SEO - XML Sitemap Rewrite Fix
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^sitemap_index\.xml$ /index.php?sitemap=1 [L]
RewriteRule ^([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
</IfModule>
# END WordPress SEO - XML Sitemap Rewrite Fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment