I find, in the config file
// assign site_url
$site_url= ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER
...
....But I dont understand this and extra domain backslashes.
I think it is dynamically calculated.
To clear it, try clearing the modx cache.
-
☆ A M B ☆
- 2,475 Posts
Well, clearing the cache *seems* to do it... although I can’t replicate the problem. The site users keep reporting errors related to this from time to time, so I’d just like to be able to force that value in a config file somewhere and eliminate it as a possible cause of the issue.
One thing I did like about Expression Engine was its config file... you could just add a hash key for various different settings in a config file (e.g. environment specific settings), and then dev and prod would each have their own versions of the config file.
Once the site is settled I might hardcode the [(site_url)] to avoid any problems.
-
☆ A M B ☆
- 2,475 Posts
Yeah, I’d like to hardcode it in the templates... but I can’t; it’s a high traffic site, so for our own sanity, we test everything on a dev server first, then once it’s signed off on, we dump the database from dev, slurp it up on prod, and rsync the assets. It’s worked really well, but in this case, we can’t change the templates, because the dev server has a different domain name... I made that mistake once already (the first page was on dev, but any link I clicked on sent me over to production... whoops). I had some trouble with the file path being different between the 2 systems, too, but ultimately I found it easier to mirror the file structures exactly on the two webservers than come up with a way to update that particular setting in the database each time we do a push.