accessing files across domains that are hosted on the same server
I have two domains sitting on the one webserver. I开发者_Go百科 have images and other files on domain1 that I want to use on the site for domain2. For a whole shedload of reasons, I can't just copy the files over to the second domain in this particular scenario.
If I'm calling these files via http calls in the code directly from the other site, will this significantly impact my loadtimes and bandwidth as they are both stored on the same physical server?
if it matters, we're talking about a LAMP environment.
Thanks in advance!
No. Apache does not make difference between different domains when serving HTTP requests. Effectively having one domain on one server is the same as having two domains on one server.
Only if you are doing AJAX calls cross-domains become an issue.
精彩评论