Quote from: OpenGeek at Apr 29, 2010, 10:25 AM
Quote from: jusmeig at Apr 29, 2010, 10:00 AM
I am sure I have fixed the issue, however I would like to know why the [(site_url)] placeholder would start giving out different values?
It is designed to return whatever HTTP_HOST is reported by the web server to PHP. Most web servers simply pass along the HTTP_HOST requested by the client browser unless specifically configured to override it. This allows sites to serve multiple domains if you have multiple virtual hosts configured to the same location. In those cases, you would not want to cache site_url into any of your pages, and it is recommended you return the site_url from a non-cacheable snippet instead of using [(site_url)] -- which will always get cached in Evolution. In Revolution, note that you can make any tag non-cacheable, so [[!++site_url]] is a valid tag which will prevent caching it from the first client to access the page.
Thanks for the reply, this is starting to make more sense now.
So in my case if the client came to the site with
http://domain.com and it got cached and used as the base url, all other links from the cached page would be off
http://domain.com.
Does MODx automatically clear it’s cache (Apart from when you save a doc etc)? I don’t recall clearing the site cache around the time the problems started? I guess this must have hapened, and the first client to cache the homepage came on
http://domain.com