[英]Website redirect based on URL to App installed in Windows Server IIS and Newer Azure App service
Looking for a design solution. 寻找设计解决方案。
We are currently migrating our old site installed in Windows Server IIS to Cloud-based Azure App service or Azure Service fabric. 我们目前正在将安装在Windows Server IIS中的旧网站迁移到基于云的Azure App服务或Azure Service结构。
We have multiple clients but one of the requirement is to move clients one by one. 我们有多个客户,但其中一个要求是逐个移动客户。
Ie They want us to use the same DNS, but based on brands it should route to the new or old site. 即他们希望我们使用相同的DNS,但基于品牌应该路由到新旧站点。
so for example, we have 2 brands 例如,我们有2个品牌
Brand 1 - moved to a new site Brand 2 - still using the old site. 品牌1 - 转移到新网站品牌2 - 仍然使用旧网站。
So we when the request comes 所以当我们提出要求时
Is this feasible? 这可行吗? If yes what are the options I have?
如果是,我有哪些选择?
I saw options to Redirect a Domain by modifying .htaccess file. 我通过修改.htaccess文件看到了重定向域的选项。
Currently looking for options to finalize the design approach ie moving all client at once or moving one by one. 目前正在寻找最终确定设计方法的选项,即一次移动所有客户端或逐个移动。 But later is preferred.
但后来是首选。
It is possible to use an Azure Function to handle the redirect. 可以使用Azure功能来处理重定向。 I have done something similar in order to create our own short urls for text messages.
我已经做了类似的事情,以便为短信创建我们自己的简短网址。 Before redirecting you can inspect the original url to determine where to redirect too.
在重定向之前,您可以检查原始URL以确定重定向的位置。
Most likely a good business case for having an azure application gateway as its made for redirecting traffic based on the route requested. 最有可能是将天蓝色应用程序网关作为根据请求的路由重定向流量的良好商业案例。 the gateway would need to be register under the domain name you want visible and you would then configure the routing rules on the app gateway resource.
网关需要在您想要显示的域名下注册,然后您将在应用程序网关资源上配置路由规则。 your azure resource and your on prem resource would be considered your backend pools
您的azure资源和您的onfront资源将被视为您的后端池
www.Mysite.com/brand1 -> point to my new cloud server pool www.Mysite.com/brand1 - >指向我的新云服务器池
www.Mysite.com/brand2-> point to my existing app server pool www.Mysite.com/brand2->指向我现有的应用服务器池
Linking the azure docs on this. 将azure文档链接到此。 https://docs.microsoft.com/en-us/azure/application-gateway/overview
https://docs.microsoft.com/en-us/azure/application-gateway/overview
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.