I have installed URL Rewrite Module 7.2.1993 and am now trying to replicate the example show here: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/url-rewrite-module-20-configuration-reference#setting-response-headers namely:
<outboundRules>
<!-- This rule changes the domain in the HTTP location header for redirection responses -->
<rule name="Change Location Header">
<match serverVariable="RESPONSE_LOCATION" pattern="^http://[^/]+/(.*)" />
<conditions>
<add input="{RESPONSE_STATUS}" pattern="^301" />
</conditions>
<action type="Rewrite" value="http://{HTTP_HOST}/{R:1}"/>
</rule>
</outboundRules>
however as soon as I add that to my web.config I get:
Module RewriteModule
Notification SendResponse
Handler ExtensionlessUrlHandler-Integrated-4.0
Error Code 0x8007000d
Config Error Unrecognized attribute 'serverVariable'
Why is that attribute serverVariable
not being recognised?
User contributions licensed under CC BY-SA 3.0