Created
April 9, 2013 13:57
-
-
Save jdevalk/5345872 to your computer and use it in GitHub Desktop.
Fix XML sitemaps to work by forcing .htaccess to pick them up. Add this to the .htaccess, above the WordPress rewrites. This version assumes you're using a subfolder install with WordPress installed in /wordpress/, adapt if needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WordPress SEO - XML Sitemap Rewrite Fix | |
RewriteEngine On | |
RewriteBase /wordpress/ | |
RewriteRule ^sitemap_index.xml$ /wordpress/index.php?sitemap=1 [L] | |
RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /wordpress/index.php?sitemap=$1&sitemap_n=$2 [L] | |
# END WordPress SEO - XML Sitemap Rewrite Fix |
Yep, seems to work fine. Thanks for that!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I also have an install of nginx that forces closing
/
http://nblog.airbrake.io.php53-5.ord1-1.websitetestlink.com/wp-admin/admin.php?page=wpseo_xml
http://airbrake.io/blog/sitemap_index.xml/