【问题标题】:sub domain to act as proxy for another sub domain? apache / htaccess [closed]子域充当另一个子域的代理? apache / htaccess [关闭]
【发布时间】:2023-03-10 12:50:01
【问题描述】:

我有一个子域:

subdomain.mydomain.com

在我的网站上有 5 张图片来自一个表格,这些图片是来自另一个网站的链接:

示例: subdomain.anothersite.com/image/123.jpg

如果我重命名表中的链接以更改域

subdomain.anothersite.com/images/123.jpg subdomain.mydomain.com/images/123.jpg

然后我可以设置某种反向代理,这意味着该表中的任何网址都将显示为:

subdomain.mydomain.com/images/123.jpg - 但实际上显示的内容来自 subdomain.anothersite.com/images/123.jpg

?

谢谢

【问题讨论】:

  • 这听起来像是 serverfault.com 的问题。堆栈溢出用于编程。

标签: apache .htaccess proxy subdomain reverse-proxy


【解决方案1】:

实际上,您可以通过从 subdomain.mydomain.comsubdomain.anothersite.com 的 DNS 设置 CNAME 来实现这一点。该域将基本上被屏蔽,您看到的所有用户都是subdomain.mydomain.com/images/123.jpg

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-02-06
    • 1970-01-01
    • 2022-11-13
    • 1970-01-01
    • 2017-01-17
    • 2019-01-12
    • 2012-12-06
    相关资源
    最近更新 更多