Interesting thing I ran into. I’m working on a website which is pointed to by two different domain names. Obviously, one occurs alphabetically before the other, but the client uses the other one "publicly." When I use "site_url" in a base href tag, the former domain name is returned, throwing off the relative addresses for various media resources used as content in the site. Also, all the ftp’ing, installation of MODx etc, has taken place under - nominally - this second domain name.
So it seems that the system must have an alphabetical array of domain names and "site_url" only pulls the first. Is that correct? Anyone know anything more about this? The solution is to hardwire the second name into the code, so it ends up being something I can get around. Still, I thought perhaps I was doing something wrong, expecting the domain name I’m actually to show up in site_url!!
MattC
Hmmm. Dunno how I ended up getting this message into this forum. But it looks like it should be moved, though I don’t seem to be able to do that myself. Can one of the moderators move this to the General Support forum, or whereever would be most appropriate? Much obliged, MattC
I have experienced something similar like this. A customer had a .no domain and a .com domain and both was going to point to the same MODx installation.
What I discovered was that if someone visited the page with the .com domain they would get the .no domain on links and pictures using phpthumb wouldnt show.
I guess that is is because of the MODx cache that cached the page on .no domain and didnt understand what to do with the .com request.
So I cleared the cache in MODx and visited the site on the .com domain first, and then it was the .no domain that had wrong links and pictures not showing.
Solutions to this is either to stop all cache of the page, but that would make it less responsive because of heavy phpthumb usage and alot of pictures and things going on behind the scenes.
What I did was using the .htaccess file to force all requests to go to the www.something.no domain, so if a visitor is visiting the .com page it will get the .no page with www infront (since phpthumb doesnt like non-www pages)
...I believed it was Friday...
So how is this 2nd domain being pointed to the modx installation? through htaccess, web redirect or via a DNS A record?
Whichever way it’s being done, if your client wants the website to appear effectively in Google, the 2nd Domain should be redirected by a 301 redirect method only, any other form of redirect Google doesn’t like.
The second domain is pointed to the same modx installation.
...I believed it was Friday...