One of the answers was : 'You lose the fixup of Set-Cookie and Location headers that ARR does - the next beta of URLRewrite v2 will include the capability to have rules to rewrite response headers, so at that point, you should be able to not use reverseRewriteHostInResponseHeaders'
My questions:
Since the answer is pretty old, can someone confirm that reverseRewriteHostInResponseHeaders ONLY fixes the Set-Cookie and Location headers and no others ?
Can someone post an efficient rewrite rule(s) which replicates reverseRewriteHostInResponseHeaders ?
I think the answer means that you could use URL rewrite V2 to create the URL rewrite outbound urle to rewrite the header like set-cookie or location. Of course, you could rewrite other response headers.
This link provide the sample outbound rule to rewrite response header:
My primary concern is with #1 : Which of the response headers does 'reverseRewriteHostInResponseHeaders' change ? Is it ONLY Set-Cookie and Location ? Or are there others ?
Also for Set-Cookie header(s), what part of the header value is replaced ? Is it just the part after 'Domain' (an example is below)
Or is it a find+replace for the complete header value ?
Reg #2 : Does 'reverseRewriteHostInResponseHeaders' internally also use regex match and replace ? I'm curious if there will be a performance impact of switching to URL re-write ?
2 Posts
Replicating reverseRewriteHostInResponseHeaders in URLRewrite
Jun 22, 2017 07:48 PM|anantaneja|LINK
I have the same issue as OP in https://forums.iis.net/t/1160195.aspx.
One of the answers was : 'You lose the fixup of Set-Cookie and Location headers that ARR does - the next beta of URLRewrite v2 will include the capability to have rules to rewrite response headers, so at that point, you should be able to not use reverseRewriteHostInResponseHeaders'
My questions:
4042 Posts
Re: Replicating reverseRewriteHostInResponseHeaders in URLRewrite
Jun 23, 2017 07:45 AM|Yuk Ding|LINK
Hi anantaneja,
I think the answer means that you could use URL rewrite V2 to create the URL rewrite outbound urle to rewrite the header like set-cookie or location. Of course, you could rewrite other response headers.
This link provide the sample outbound rule to rewrite response header:
https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/url-rewrite-module-20-configuration-reference#Setting_Response_Headers
Best Regards,
Yuk Ding
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue.
2 Posts
Re: Replicating reverseRewriteHostInResponseHeaders in URLRewrite
Jun 26, 2017 06:04 PM|anantaneja|LINK
Hi Yuk,
Thanks for the reply! The doc link was helpful.
My primary concern is with #1 : Which of the response headers does 'reverseRewriteHostInResponseHeaders' change ? Is it ONLY Set-Cookie and Location ? Or are there others ?
Also for Set-Cookie header(s), what part of the header value is replaced ? Is it just the part after 'Domain' (an example is below)
Or is it a find+replace for the complete header value ?
Reg #2 : Does 'reverseRewriteHostInResponseHeaders' internally also use regex match and replace ? I'm curious if there will be a performance impact of switching to URL re-write ?
Thanks,
Anant