0

I have an Azure Application Gateway which is loading to my IIS server, but in order for the page to function it needs to load a file from a subdirectory. Instead of domain.com a user must go to domain.com/views/login . So I thought I could use an Application Gateway Rewrite Set in order to do this, but I'm failing to make sense of the documentation at https://docs.microsoft.com/en-us/azure/application-gateway/rewrite-url-portal.

I attempted to create a rule that would take (.*)\.mydomain\.com$ so that only when someone summons the front page (portal.domain.com, or test.domain.com, or dev.domain.com) would they then be redirected to .*domain.com/views/login - it was my hope that if someone goes to portal.domain.com/photos/img.jpg that this redirect rule will not apply.

My rule of course does not work, so I am wondering what am I doing wrong here and what is the correct rule I should be making?

By the time they get to this request the application gateway listeners have already redirected everyone to https.

Thank you for your help.

An image of my rule is located at: https://i.stack.imgur.com/TN8LQ.png I don't have the reputation to include it though.

New contributor
lostScriptie is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

lostScriptie is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.