gpt4 book ai didi

java - 将一个网站嵌入到另一个网站中

转载 作者:行者123 更新时间:2023-12-02 06:50:49 25 4
gpt4 key购买 nike

要求的第一部分是能够将我们的网站(例如 www.mysite.com)嵌入到我们合作伙伴的网站(例如 www.partner1.com)中>).

第二部分是从合作伙伴网站访问我们页面的客户应该能够为我们的页面添加书签(添加书签的链接www.partner1.com/page/sample.jsp应该将用户带到< em>www.mysite.com/page/sample.jsp 内部)。客户应该在地址栏中看到 www.partner1.com/page/sample.jsp,并且不应该知道该页面是由 www.mysite.com 提供的。

因此 iFrame 是不可能的。有更好的方法吗?有支持这种嵌入的产品吗?

我们最终希望将我们的网站嵌入多个合作伙伴并提供相同的书签功能。

最佳答案

您正在寻找的是反向代理。这是一个在您合作伙伴的站点上运行的 Web 服务器组件,它从您的服务器获取页面并将其交付给最终客户。 Apache 将反向代理定义为:

A reverse proxy (or gateway), by contrast, appears to the client just like an ordinary web server. No special configuration on the client is necessary. The client makes ordinary requests for content in the name-space of the reverse proxy. The reverse proxy then decides where to send those requests, and returns the content as if it was itself the origin.

这更多的是一个系统管理问题,而不是一个编程问题。我不知道你的合作伙伴正在使用什么网络服务器,但是 relevant Apache documentation is here 。如果您想要保密,请仔细检查网络服务器 header 以确保信息不会泄露。

关于java - 将一个网站嵌入到另一个网站中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18042848/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com