IIS Rewrite rule does not work 2nd time onwards - gives 404 error

67 Views Asked by At

We are trying to integrate OHIF with Orthanc Server. and We are using MVC application to integrate.

We have installed IIS and Orthanc Server on the same machine.

We have configured IIS rewrite, where we will rewrite of the response of the Orthanc server.

https://book.orthanc-server.com/faq/iis.html

<rules>
    <rule name="ReverseProxyInboundRule1" stopProcessing="true">
      <match url="^orthancserver/(.*)" />
      <action type="Rewrite" url="http://127.0.0.1:8042/{R:1}" />
    </rule>
</rules>

All URL Redirect working. And already installed Rewrite Module and I have enabled the proxy too.

I have been chasing unsuccessfully the solution for more than a month. Any help would be greatly appreciated!

picture of error

1

There are 1 best solutions below

1
On

From your frt log, it can be seen that the first rewrite is performed through a ApplicationRequestRoutingHandler, but the handler for the second rewrite is system.Web.Mvc.MvcHandler, so the problem should be in your mvc project , please check the content of url rewriting in your mvc.