Reputation: 555
In Azure Application Gateway, is it possible to do the following redirects:
example.com/folder1/page1.html > newexample.com
www.example.com/folder1/page1.html > newexample.com
example2.com/folder2/page2.html > newexample.com/page2.html
I've added a single listener and rule for the first redirect and that is working. I've tried to add multiple rules through the Azure dashboard, but see the following error:
There are no unassociated listeners available. Create a new listener and then try again.
When I try to add another basic listener, I see:
This HTTP listener cannot use the same frontend port as an existing listener.
Also, if I change the existing rule to be redirect to another URL, it doesn't appear to update - I am redirected to the original site.
Any help is appreciated.
Upvotes: 2
Views: 1712
Reputation: 25
It seems to me that you need to configure multiple site listener, refer to following link: https://learn.microsoft.com/en-us/azure/application-gateway/multiple-site-overview
Upvotes: 1
Reputation: 555
I decided to set up vhosts in nginx and redirect the domains. It seemed much simpler than configuring the Azure Application Gateway.
<VirtualHost *:8080>
ServerName www.example.org.uk
ServerAlias example.org.uk
Redirect 301 / https://www.newexample.com/abc/def/ghi
</VirtualHost>
Upvotes: 0