url rewrite to picking the correct urlRSS

1 reply

Last post Aug 21, 2020 06:54 AM by Jalpa Panchal

  • url rewrite to picking the correct url

    Aug 20, 2020 12:23 PM|Samit___|LINK

    Hi,

    Why the reponse back is picking the inbound rule url ??

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    <system.webServer>
    <rewrite>
    <outboundRules>
    <rule name="ReverseProxyOutboundRule1" preCondition="IsRedirection">
    <match filterByTags="A, Form, Img" serverVariable="RESPONSE_LOCATION" pattern="^http://[^/]+/(.*)" />
    <action type="Rewrite" value="https://sonarqubetest.com/{R:1}" />
    </rule>
    <preConditions>
    <preCondition name="IsRedirection">
    <add input="{RESPONSE_STATUS}" pattern="3\d\d" />
    </preCondition>
    <preCondition name="ResponseIsHtml1">
    <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
    </preCondition>
    </preConditions>
    </outboundRules>
    <rules>
    <rule name="ReverseProxyInboundRule1" stopProcessing="true">
    <match url="(.*)" />
    <action type="Rewrite" url="http://127.0.0.1:9000/{R:1}" />
    <serverVariables>
    </serverVariables>
    </rule>
    </rules>
    </rewrite>
    </system.webServer>
    </configuration>

    Output recieved 

    Reason: The response was received at http://127.0.0.1:9000/oauth2/callback/saml instead of https://sonarqubetest.com/oauth2/callback/saml

  • Re: url rewrite to picking the correct url

    Aug 21, 2020 06:54 AM|Jalpa Panchal|LINK

    Hi,

    Please try to run the failed request tracing and share the tracing log here or analyze the log by your self. and please provide more detail like what is your requirement, what did you do, and what is your expected output, what is the requested URL. 

    https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.