accessing files across domains that are hosted on

2019-09-09 20:47发布

I have two domains sitting on the one webserver. I 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!

1条回答
地球回转人心会变
2楼-- · 2019-09-09 21:29

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.

查看更多
登录 后发表回答