I'm trying to use this regex to get a different sitemap.xml per host, without the subdomain:
rewrite "([a-zA-Z\d-]+).([a-zA-Z\d-]+\.([a-z]{2,3}))\/sitemap.xml" /sitemaps/$2.xml; As you can see here https://regex101.com/r/WVQQ27/1 the regex works and the 2nd capture group should be the host without subdomain.
But for some reason I keep getting a 404. Any ideas?
The technical background is that we have different sitemaps for different domains but shared content between them as well depending on the language(s) of the content served by the same application.
/sitemaps/world-architects.com.xmlpresent?rewritestatement.