Answer the question
In order to leave comments, you need to log in
Different sitemap.xml and robots.txt files on subdomains linked by the same MODx build?
Hello guys!
I made a subdomain sub1.mainsite.ru referring to the files of the main domain in order to work with two sites through one control panel in the future.
I switch the context with the ContextRouter plugin.
Everything is working properly.
But there is one thing, the sitemap.xml and robots.txt files are shared.
Decided to create a directory "/assets/subdomains/sub1" and add separate files there for a specific subdomain.
Alas, it is difficult to work with .htaccess, after long googling I have not found a solution, how to get a file from the "/assets/subdomains/sub1" directory when accessing sub1.mainsite.ru/sitemap.xml.
Thank you for attention!
Answer the question
In order to leave comments, you need to log in
pdoSitemap
Same with robots.txt. Create a resource at the root of the context with a content type of text.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question