How to redirect in app service

디엔소프트 DNSOFT 196 Reputation points

I'm using an app service, and if I have a domain called, I want to know how to redirect to when I connect to

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

Accepted answer
  1. brtrach 251 Reputation points

    To rewrite a URL, you need to create a web.config file in your wwwroot folder and put the necessary entries in there, if you don't already have a web.config file for your site.

              <rule name="Redirect rquests to default azure websites domain" stopProcessing="true">
                <match url="(.*)" />  
                <conditions logicalGrouping="MatchAny">
                  <add input="{HTTP_HOST}" pattern="^yoursite\.azurewebsites\.net$" />
                <action type="Redirect" url="{R:0}" />  


    0 comments No comments

0 additional answers

Sort by: Most helpful