accessing files across domains that are hosted on the same server

橙三吉。 提交于 2019-12-11 15:38:40

问题


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:


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.



来源:https://stackoverflow.com/questions/6447184/accessing-files-across-domains-that-are-hosted-on-the-same-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!