Azure网关重定向以保留URL [英] Azure Gateway redirect to keep url

查看:81
本文介绍了Azure网关重定向以保留URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经设置了Azure网关,并将其与AppService绑定.但是我们面临的问题是,一旦我们单击到网关的链接,网关就会将我们重定向到AppService,但Url也会发生变化.我们想要实现的是保持 网址相同.能做到吗?

We have set up an Azure Gateway and bound it with an AppService. But the issue we are facing is that once we click the link to the Gateway, the Gateway redirects us to the AppService, but the Url gets changed as well. What we want to achieve is to keep the URL the same. Can this be achieved?

此外,在测试时,我注意到对AppService的调用只有少数被重定向(302),而大多数调用为200 OK(这些大多数是Get调用和javascript \ css文件).

Also, while testing I noticed that only a few of the calls to the AppService got redirected (302) while most were 200 OK (these were mostly Get calls and javascript\css files).

推荐答案

您好,Riste Golaboski,

Hi Riste Golaboski,

应用程序网关重定向支持以下功能:
全局 重定向:从网关上的一个侦听器重定向到另一个侦听器.这样可以在站点上实现HTTP到HTTPS重定向.

Application Gateway redirection support these capabilities:
Global redirection: Redirects from one listener to another listener on the gateway. This enables HTTP to HTTPS redirection on a site.

基于路径的 重定向:这种重定向类型仅允许在特定站点区域(例如,以/cart/*表示的购物车区域)上进行HTTP到HTTPS重定向.

Path-based redirection: This type of redirection enables HTTP to HTTPS redirection only on a specific site area, for example a shopping cart area denoted by /cart/*.

重定向到外部站点:,您需要创建一个新的重定向配置对象,该对象指定需要重定向到的目标侦听器或外部站点.配置元素还支持启用的选项 将URI路径和查询字符串附加到重定向的URL.您还可以选择重定向是临时重定向(HTTP状态代码302)还是永久重定向(HTTP状态代码301).

Redirect to external site: With this, you need to create a new redirect configuration object, which specifies the target listener or external site to which redirection is desired. The configuration element also supports options to enable appending the URI path and query string to the redirected URL. You can also choose whether redirection is a temporary (HTTP status code 302) or a permanent redirect (HTTP status code 301).

我不确定当前是否支持您的重定向方案.但是,您是否尝试过将自定义域从指向App Service更改为指向Application Gateway的公共IP或DNS名称?这可以在您的DNS注册商中完成.还, 您遵循什么教程来使用Application Gateway配置App Service?

I am not sure if your redirection scenario is currently supported. But have you tried to change your custom domain from pointing to the App Service to pointing to the Application Gateway's public IP or DNS name? This can be done in your DNS registrar. Also, what tutorial did you follow to configure App Service with Application Gateway?


这篇关于Azure网关重定向以保留URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆