locked
URL Rewrite web page does not display when hyperlinked from another web page RRS feed

  • Question

  • User805391645 posted

    I have 2 pages on a intranet website.  The 1st is called Test.htm and contains:

    <html>
    <body>
    <a href="Test.asp">link</a>
    </body>
    </html>

    The 2nd is called Test.asp and contains:

    <%
    set a = server.CreateObject("Test.clsTest")
    a.WriteResponse
    set a = nothing
    %>
    

    I have set up URL Rewrite with the following web.config:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <outboundRules>
                    <preConditions>
                        <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://192.168.0.20/{R:1}" />
                    </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </configuration>
    

    I can open https://www.mypublicserver.com/Test.htm and click on the link.  The url in the address bar changes to https://www.mypublicserver.com/Test.asp but displays an empty page 0 bytes.

    If I enter https://www.mypublicserver.com/Test.asp straight into the address bar, it will display the page correctly.

    Is this an issue with URL Rewrite or the intranet website?

    Wednesday, April 28, 2021 1:56 PM

All replies