wordpress-heroku-php icon indicating copy to clipboard operation
wordpress-heroku-php copied to clipboard

XML Sitemap Rewrite Issue

Open a4amaan opened this issue 7 years ago • 1 comments

I have installed a plugin to generate sitemap, but it saying "Since you are using Nginx as your web-server, please configure the following rewrite rules in case you get 404 Not Found errors for your sitemap:"

rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.xml$ "/index.php?xml_sitemap=params=$2" last;
rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.xml\.gz$ "/index.php?xml_sitemap=params=$2;zip=true" last;
rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.html$ "/index.php?xml_sitemap=params=$2;html=true" last;
rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.html.gz$ "/index.php?xml_sitemap=params=$2;html=true;zip=true" last;

Can someone guide me how to setup these rewrite rules?

a4amaan avatar Oct 06 '18 10:10 a4amaan

In .htaccess file.

srisaikamal avatar Apr 08 '20 08:04 srisaikamal