[英]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.