2

I have a virtual machine in Azure and on that machine I have a IIS installed. On that IIS I have installed the URL Rewrite module and redirect all HTTP calls to HTTPS.

The problem I am noticing is that my rule that I am creating is removed from time to time. Have anybody any clue to why this is happening and how I can do the redirection from HTTP to HTTPS instead in a way not using the URL rewrite module.

Thanks /Magnus

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Magnus Gladh
  • 1,817
  • 4
  • 20
  • 31

1 Answers1

1

Aaa I found it!

It seems that the URL rewrite is removed every time I deploy a new version, and the reason is that the URL rewrite information is saved in the web.config file on the server when I add it in the IIS Administration.

And it's not part of my web.config file that I deploy. So all I have to do is to add the XML added by the URL Rewrite module from the web.config file on the server to my web.config file in my project and the redirect will stay.

Magnus Gladh
  • 1,817
  • 4
  • 20
  • 31