locked
URL Re-Write creates "Object Moved" page for missing files with link to physical path of 404 page on server RRS feed

  • Question

  • User-1689278823 posted

    Hello - When using URL Re-Write to redirect HTTP requests to HTTPS we get an "Object moved to here." page.  This isn't necessarily a problem, but the "here" link contains the physical path to the error page:

    https://<site name>/c%3a%5cinetpub%5ccusterr%5cen-US%5c400.htm%3faspxerrorpath%3d%2ftest.aspx

    The url re-write rule is:

    <rule name="HTTPS Rule" enabled="true" stopProcessing="true">
        <match url="(.*)" />
            <conditions>
                <add input="{HTTPS}" pattern="^OFF$" />
            </conditions>
        <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" appendQueryString="false" redirectType="Permanent" />
    </rule>

    The physical path being displayed is being reported as a security issue and I need to either eliminate the redirect page or have the link point to the 404 page.  We are using the standard issue IIS custom error pages with default settings.  Any help would be greatly appreciated.

    Monday, April 13, 2020 11:44 AM

All replies

  • User288213138 posted

    Hi 00coday,

    When using URL Re-Write to redirect HTTP requests to HTTPS we get an "Object moved to here." page.  This isn't necessarily a problem

    You are getting this error because the value inside the Response.Redirect is empty.

    The physical path being displayed is being reported as a security issue and I need to either eliminate the redirect page

    Do you want to eliminate the physical path shown in "Here"? If so, then I suggest you can try to create an outbound rewrite rule to change the URLs in the HTML responses.

    About how to Creating Outbound Rules you can refer to this link: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/creating-outbound-rules-for-url-rewrite-module

    Best regards,

    Sam

    Tuesday, April 14, 2020 5:59 AM