正在将子域重定向到Azure上的目录
简单地说,我如何将正在将子域重定向到Azure上的目录,azure,iis,dns,azure-web-app-service,Azure,Iis,Dns,Azure Web App Service,简单地说,我如何将test.example.com重定向到example.com?我想让子域对用户来说是“真实的”(在后台重定向,URL仍然是test.example.com/index.html)。我已尝试修改域上的DNS设置、IIS配置,并将我的子域添加到Azure配置中 Web.Config <rule name="Push Subdomain to Push folder"> <match url="(.*)" /> <conditions>
test.example.com
重定向到example.com
?我想让子域对用户来说是“真实的”(在后台重定向,URL仍然是test.example.com/index.html
)。我已尝试修改域上的DNS设置、IIS配置,并将我的子域添加到Azure配置中
Web.Config
<rule name="Push Subdomain to Push folder">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^test.example.com$" />
</conditions>
<action type="Rewrite" url="http://example.com/test/{R:1}" />
我的DNS配置:
子域:test | URL:example.azurewebsites.net |记录类型:CNAME(别名)
执行此操作时,会收到以下错误消息:
由于发生内部服务器错误,无法显示该页面。
我已通过将上述更改为
<rule name="Rewrite sub-domain to dir" enabled="true">
<match url="^(.*)$" />
<conditions>
<add input="{HTTP_HOST}" pattern="^test\.example\.com$" />
</conditions>
<action type="Rewrite" url="test/{R:1}" />
这篇文章有点老了,但我得问问你。我想在我的Azure网站上做同样的事情。当我执行上述操作时,我得到一个内部服务器错误(500)。你能帮帮我吗?谢谢