How to redirect to different host name based on URL path in Azure Application Gateway

Prashanth Ravichandar 1 Reputation point Microsoft Employee
2023-06-20T16:23:02.7+00:00

Hi,

We have an application gateway with app service. We have 2 custom domains. https://tip2.support.fabric.microsoft.com/ and https://tip2.blog.fabric.microsoft.com/. We have 2 paths /blog and /support. Currently we can access both of these paths from both the custom domains .E.g. https://tip2.blog.fabric.microsoft.com/blog, https://tip2.blog.fabric.microsoft.com/support, https://tip2.support.fabric.microsoft.com/supportand https://tip2.support.fabric.microsoft.com/blog. I want to author application gateway rules such that when user tries to access https://tip2.support.fabric.microsoft.com/blog, they should be navigated to https://tip2.blog.fabric.microsoft.com/blog. And when user tries to access https://tip2.blog.fabric.microsoft.com/support, they should be navigated to https://tip2.support.fabric.microsoft.com/support. I need some help on how to achieve this using Application gateway

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,210 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AirGordon 7,145 Reputation points
    2023-06-20T17:53:04.1633333+00:00

    First, create multi-site listeners for the 2 domains.

    Configure the backends are normal.

    Then create a path based redirection rule redirecting to an External site, then provide the desired URL.

    User's image


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.