0

We have multiple sites hosted with Domain access module. I was planning to host sitemap.xml files like web_root/zyx.com/sitemap.xml and web_root/abc.com/sitemap.xml.

I am using the following code.

RewriteCond %{HTTP_HOST} ^xzy.com [NC]
RewriteRule ^sitemap.xml$ /xzy.com/sitemap.xml

This code isn't universal and it requires to duplicate it every time a new domain is added.

How can this code be improved to serve sitemaps from web_root/website_name/sitemap.xml?

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.