Reputation: 685
I am trying to redirect the request which comes to Https://www.example.ie to Https://www.example.com/ab-ng. Below is the rule which I have in my web.config but not working as expected.
<rule name="Redirect to ab-ng" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^Https://www.example.ie$" />
</conditions>
<action type="Redirect" url="https://www.example.com/ab-ng/{R:0}" redirectType="Permanent" />
I am new to redirect rules, please help.
Upvotes: 1
Views: 3283
Reputation: 1683
action type="Redirect"
.Remove Https
. It has to be<action type="Redirect" url="https://www.example.com/ab-ng/{R:0}" redirectType="Permanent" />
Check whether the web.config
file is deployed properly, It has to be under wwwroot
directory in KUDU Console.
In Azure portal,Make sure HTTPS Only
is set to On
under TLS/SSL settings.
Please refer Web.config redirects with rewrite rules for more information
Upvotes: 1