Custom Rewrite Provider for URL Rewrite Module

后端 未结 1 1761
刺人心
刺人心 2021-01-25 03:33

I have a Custom Rewrite Provider for URL Rewrite Module running in IIS, I use to redirect request based on my custom logic.

It is based on this: http://www.iis.net/learn

相关标签:
1条回答
  • 2021-01-25 04:26

    So found the answer, it uses a naming convention:

    Server variables can also be used to access HTTP headers from the current request. Any HTTP header supplied by the current request is represented as a server variable that has a name generated in accordance to this naming convention:

    All dash ("-") symbols in the HTTP header name are converted to underscore symbols (""). All letters in the HTTP header name are converted to capital case. "HTTP" prefix is added to the header name.

    in my case, I ended up with something like this in my Action Properties \ Redirect URL: {RoutingProvider: {QUERY_STRING}|{HTTP_ORGANISATIONID}}

    HTTP_ORGANISATIONID is my custom header.

    Thanks

    0 讨论(0)
提交回复
热议问题