Help! Pantheon Hosting XML sitemaps. Must add rewrite code to wp-config
-
I was hoping you guys could help me out with the nginx rewrite rules that I need to add to get the XML Sitemaps feature working. I have looked everywhere for help on this and have failed several times trying to implement on my own.
The catch is that Pantheon, https://pantheon.io, requires rewrite rules to be added to the wp-config.php file. Here is a link to their documentation explaining how to include redirects and rewrites, https://pantheon.io/docs/articles/sites/code/redirect-incoming-requests/
Can you help me figure out how to add your nginx redirect code to the wp-config.php file?
rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;Thanks in advance!
- The topic ‘Help! Pantheon Hosting XML sitemaps. Must add rewrite code to wp-config’ is closed to new replies.