Redirect to

Antonio Savage 6 Reputation points

Hello I have a site hosted on Azure in the App Services service. I then have an application gateway in front of that app acting as a WAF and it's a v1 appgateway.

I need to figure out how to redirect to I was able to figure out how to redirect to, but now that redirect (using listeners and rules in the appgateway), is injecting the /wehavemoved path into all requests. So when I try to visit, it redirects to Is there anyway in Azure that I can make it so that both the and both redirect to

I can add any additional information as requested.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
4,940 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Joffrey NURIT 196 Reputation points MVP

    Some solutions can help you, depend of your configuration.

    Have you Linux or Windows app service? .net app or not?

    You have .Net core app for example, you can use the Kestrel Middleware to redirect some route.

    The best solution is to use system middleware. If you are on windows App Service, it's IIS. You can change this with web.config file. web.config file act like .htaccess for apache. You can add rules to redirect some route on another, and attribute an HTTP redirect code for SEO.

    An example:
    alt text

    1 person found this answer helpful.
    0 comments No comments

  2. Stephen Weinrich 6 Reputation points

    Look at Path Based Routing:

    I would also recommend upgrading to Application Gateway V2.

    1 person found this answer helpful.
    0 comments No comments