admin管理员组文章数量:1398840
Let's say I have an app hosted at . The problem is that, due to the way the app is configured, it returns a 404 error when accessed at the root URL. So, whenever a request is made to , it should be redirected to .
I followed the steps in this Azure Application Gateway WAF V2 redirect request, but the redirect still doesn't work. I continue to get a 404 error, and the redirection never happens.
I suspect the issue is that the root URL returns a 404 error (even though I have set up a health probe), preventing the WAF from processing the redirection rules. If that's the case, how can I fix it?
Let's say I have an app hosted at http://example. The problem is that, due to the way the app is configured, it returns a 404 error when accessed at the root URL. So, whenever a request is made to http://example, it should be redirected to http://example/test.
I followed the steps in this Azure Application Gateway WAF V2 redirect request, but the redirect still doesn't work. I continue to get a 404 error, and the redirection never happens.
I suspect the issue is that the root URL returns a 404 error (even though I have set up a health probe), preventing the WAF from processing the redirection rules. If that's the case, how can I fix it?
Share Improve this question asked Mar 14 at 21:43 John BakerJohn Baker 294 bronze badges 2- If you want to redirect traffic from example to example/test, make sure the redirect rule is set up properly in the Rewrite or Redirect configuration. – Venkat V Commented Mar 15 at 7:32
- You can also achieve this through the backend setting override option. For more information, see learn.microsoft/en-us/azure/application-gateway/… – Venkat V Commented Mar 15 at 7:43
1 Answer
Reset to default 0Azure (WAF) Redirect from Root URL somewhere inside the app
If you want to redirect your application to another path using an application gateway, you can configure the Override Backend Path in the backend settings with your application path (e.g., /websocket). Make sure to add the path in Path-based Routing
Whenever I hit the application gateway's public IP, it picks the hostname from the backend pool and redirects to another path, as shown below.
Here is the output:
Reference: Override backend path
本文标签: gatewayAzure (WAF) Redirect from Root URL somewhere inside the appStack Overflow
版权声明:本文标题:gateway - Azure (WAF) Redirect from Root URL somewhere inside the app - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744631384a2616560.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论