E
E
ElijahAysin2018-07-20 16:46:01
MODX
ElijahAysin, 2018-07-20 16:46:01

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

2 answer(s)
S
Sanes, 2018-07-20
@ElijahAysin

pdoSitemap
Same with robots.txt. Create a resource at the root of the context with a content type of text.
5b51f370220e7646907193.png

Z
zahod5277, 2018-07-20
@zahod5277

Well, or you can not crutch, but use the free component RobotsBuilder

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question