[英]AWS Route53: Redirecting Domain without Changing URL in browser
I have a Domain bought from AWS and Hosted on AWS Route 53. Assume the domain is example.com
.我有一个从 AWS 购买并托管在 AWS Route 53 上的域。假设域是
example.com
。 Moreover, I have an account on zendesk with a subdomain example.zendesk.com
.此外,我在 zendesk 上有一个帐户,其子域为
example.zendesk.com
。
What I would like to do is to map a subdomain help.example.com
to example.zendesk.com
.我想做的是将子域
help.example.com
映射到example.zendesk.com
。 I am able to do so by adding a CNAME record in Route53.我可以通过在 Route53 中添加 CNAME 记录来做到这一点。 When I write
help.example.com
in my browser, it does redirect to the requested page.当我在浏览器中编写
help.example.com
时,它会重定向到请求的页面。 However, the domain the browser changes to example.zendesk.com
.但是,浏览器将域更改为
example.zendesk.com
。 I would like to be able to get redirected to the page without the domain being changed in the browser.我希望能够在浏览器中不更改域的情况下重定向到页面。
How can I do that?我怎样才能做到这一点?
There is a way of doing this using iframe, put this html on S3 and map your help.example.com to S3 static website
有一种使用 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>
Other option is rewrite rule but I don't know if AWS support it or not
其他选项是重写规则,但我不知道 AWS 是否支持它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.