Sitemap.xml rewrite for XML Sitemap & Google News feeds

I just change the sitemap plugin from Yoast to another name “XML sitemap and Google News feed”.

The plugin work fine except it add a slash at the end of the xml, like , it become a directory rather than a file.

I asked the plugin author, it said because the sitemap.xml is not a real static file, so in most nginx settings, it will pass to php-fpm so it will add a slash after it.

May I ask what rewrite rule I should add to the config files?


Which version of your wordpress are you running? I am not able to get the plugin working. I added all those rewrite rules shown in the plugin docs. For me, its returning a 404.

The problem was fixed, thanks so much

What else did you do?