Application gateway path-based redirect rule works, but adds "redirected" path to the target URL

Leo 0 Reputation points
2024-11-08T20:59:59.83+00:00

I would like to configure MS Azure application gateway to redirect URL1 to URL2 based on URL1 path. For instance, I would like to redirect https://leo.test.ca/open/ to https://tod.test.ca/important/breach/.

See picture below.

User's image

When I access https://leo.test.ca/open/ I get redirected to https://tod.test.ca/important/breach//open/ rather than expected https://tod.test.ca/important/breach/ .

What am I missing here?

Thank you,

Leo

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,087 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sai Prasanna Sinde 1,260 Reputation points Microsoft Vendor
    2024-11-11T05:51:44.1233333+00:00

    Hi @Leo,

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

    We understand that you are trying to configure application gateway to perform URL redirects but when you try to access https://leo.test.ca/open/ you get redirected to https://tod.test.ca/important/breach//open/ rather than expected https://tod.test.ca/important/breach/ . and is causing issues.

    This is expected when the "Include Path" option is enabled in your routing rule as below:

    User's image

    To fix this issue, please disable the "Include Path" option in your routing rule.

    Kindly let us know if the above helps or you need further assistance on this issue.

    If this answers your query, do click **Accept Answer** and **Yes** for was this answer helpful. And, if you have any further query do let us know.

    Regards,

    Sai Prasanna.


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.