子域如何保留其重定向到的 url 的完整 url?

How the subdomain keep the full url of the url that it is redirecting to?

我不确定我的问题的标题所以让我用例子来解释一下情况:

我有一个 wordpress 网站:wwww.mywebsite.com (DNS:Godaddy,托管在 Azure 上,启用 SSL)

我设置了一个托管在另一个 Azure 帐户上的论坛网站,url 例如:myforum.azurewebsites.net

我想要一个子域 "forum"(forum.mywebsite.com) to redirect to the forum website. I managed to achieve the redirection by using Godaddy subdomain settings. I also enabled the masking so the user see the forum.mywebsite.com 在浏览器上。

问题是论坛 url 没有显示子文件夹 url。例如,如果有人想登录,用户应该看到:forum.mywebsite.com/login but the user only sees: forum.mywebsite.com

如何以 url 保留子文件夹路径的方式实现重定向。

您需要在 Azure 上设置自定义域,这将要求您在 Godaddy 上的 DNS 中为 forum.mywebsite.com 创建一个 CNAME 记录,其值为 myforum.azurewebsites.net