Application Gateway V1 External Site Redirection Adds Trailing Slash

John Doe 1 Reputation point
2022-04-29T19:04:55.187+00:00

Recently setup an Application Gateway to perform some URL redirects but I've run into an issue. I have a routing rule to redirect traffic to an external site, however, when the AppGw redirects to the external site it adds a trailing slash "/" to the end of the URL.

Example:
I want to redirect www.blahblah.com/foobar >to> www.blahblah.com/foo/bar

The AppGw instead redirects to www.blahblah.com/foo/bar/

Is there a way around this? Or is this expected behavior when the AppGw redirects to an external site/URL?

Thanks.

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,213 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 50,021 Reputation points Microsoft Employee Moderator
    2022-05-02T13:03:54.23+00:00

    Hello @John Doe ,

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

    I understand that you setup an Application gateway to perform URL redirects but one routing rule which redirects to an external site is adding a trailing slash "/" at the end of the URL and is causing issues.

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

    198197-image.png

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

    198209-image.png

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

    ----------------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


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.