繁体   English   中英

AWS Route53:重定向域而不更改浏览器中的 URL

[英]AWS Route53: Redirecting Domain without Changing URL in browser

我有一个从 AWS 购买并托管在 AWS Route 53 上的域。假设域是example.com 此外,我在 zendesk 上有一个帐户,其子域为example.zendesk.com

我想做的是将子域help.example.com映射到example.zendesk.com 我可以通过在 Route53 中添加 CNAME 记录来做到这一点。 当我在浏览器中编写help.example.com时,它会重定向到请求的页面。 但是,浏览器将域更改为example.zendesk.com 我希望能够在浏览器中不更改域的情况下重定向到页面。

我怎样才能做到这一点?

有一种使用 iframe 执行此操作的方法,将此 html 放在 S3 上并将您的 help.example.com 映射到 S3 静态网站

<!DOCTYPE html>
<html>
  <head>
    <title>My website</title>
    <base target="iframe">
  </head>
  <body style="margin: 0px">
    <iframe id="iframe" src="example.zendesk.com" style="position: absolute; height: 100%; width: 100%; border:0px">
      <p>Your browser does not support iframes.</p>
    </iframe>
  </body>
</html>

其他选项是重写规则,但我不知道 AWS 是否支持它

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM