2

I'm adding a URL redirect rule to redirect a user from HTTP to HTTPS in a way that it preserves the original query. For example...

http://localhost/myapp/test >> https://localhost/myapp/test

http://localhost/myapp/test?id=test >> https://localhost/myapp/test?id=test

However the application name isn't being included in the redirect so what I actually get is the following...

http://localhost/myapp/test >> https://localhost/test

Inbound Rule

inbound rules

IIS structure

  • Sites
    • Default Web site
      • MyApp

I believe I'm missing a IIS variable in my redirect url https://{HTTP_HOST}/{R:1} which represents the application.

Is there a IIS variable that represents the application level(MyApp) I can add to the redirect URL, or another way of doing this?

heymega
  • 9,215
  • 8
  • 42
  • 61

1 Answers1

1

I managed to get this working by adding the URL variable.

https://{HTTP_HOST}{URL}
heymega
  • 9,215
  • 8
  • 42
  • 61