wordpress sitemap xml files in magento subfolder not visible, broken page 404

We came across a mageno website that had a wordpress blog in a sub folder, the wordpress sitemap.xml files were not accessible via the browser, a custom 404 page would be displayed instead.
 
the blog URL was set to be accessed here: domain.com/blog/  but was actually installed in the /newsblog/ folder.  not sure if that contributed to the issue or not. 
 
solution:
add this to rewrite section of htaccess

#added to make sitemaps work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blog\/(.*\.xml)$ /newsblog/index.php/$1 [L]

Add Feedback