-
- 4 Posts
Hello
I have a Revo 2.3 installation with four domains company1.com, company1.org, company2.com, company2.org.
The apache vHost has domain1.com as serveraddress and the others (also with www) als aliases.
The domains *.org rewrite to *.com.
The only differences between company1.* and company2.* are some css colors and the logos.
I read the URL with [[!++site_url]] and $modx->getOption('site_url') and like to control the "branded" output by chunks.
All calls are uncached.
The problem is that site_url does not changing correctly. When I switch from company1.com to company2.com and back it works. When I switch two times between company1 and company2 it stops working. While the browser address is company1.com, the HTTP header and HTTP_HOST stay on company2.com (or opposite). So the browser address gets ignored after this.
Maybe a problem(?): When I switch between the domains I see the google analytics cookie behind the domain like domain1.com?__ga...
What could be the problem? An open connection / cookie?
Is it possible to do some color and logo changes this way? I think two contexts or two vHosts for only this is too much.
Thanks a lot for helping.
Martin
-
- 170 Posts
Martin,
We have one site with exactly the same problem.
We have multiple aliases running on the same domain hosting, and site url seems to be almost anything changing all the time (even for pop or smtp.domain.tld
In our case, we want to fix on one domain, but symptom is the same.
So if you find a solution, let us know.
Philippe
-
- 4 Posts
Philipp
As workaround I rewrite all domains to the main domain. But this not a solution.
Do you see also this google analytics path behind the url in the browser bar when you switch?
Martin
-
- 88 Posts
i too am interested in finding this solution.
for me, suddenly today the "site_url" started changing randomly between my various domain aliases - which started causing issues with fonts & library CDN's i'm linking to. so far the only temporary solution i've found is to manually (via ftp) delete all the cache folders in the core/caches/ directory.
but i do have future plans/desires to have a landing page for each of these other domain aliases. haven't quite figured out how to manage this yet.
so i'll be keeping an eye out here & elsewhere - will share if i find anything.
-
- 1,154 Posts
This thread should not be answered, op
Are you using different contexts for each one?
-
- 953 Posts
Just for information: As the post has not been answered I have removed the answer flag.
-
- 4 Posts
I used the same context for each alias. After change from one alias to an other and back site_url didn't change back and stayed on the second alias. On http level the url changed but site_url ignored it.
Now I am using only one domain and rewrite all aliases to it.