3
votes

I looking for help making URL rewrite rule for redirecting all urls that start with

http://localhost:13080/saCore/ws/messagebroker[Here something that changes]

to

http://localhost:13080/saCore/ws/messagebroker/MessageBroker.asmx[Here something that changes]

I just to need to push MessageBroker.asmx in the middle of the path after messagebroker part.

Thanks for help.

1

1 Answers

4
votes

This should do the job, you can add it directly to applicationHost.config or use IIS Manager to create the rule:

<rule name="RedirectBroker" stopProcessing="true">
    <match url="^saCore/ws/messagebroker(.*)" />
    <conditions>
        <add input="{HTTP_HOST}" pattern="^localhost$" />
        <add input="{SERVER_PORT}" pattern="^13080$" />
    </conditions>
    <action type="Rewrite" url="/saCore/ws/messagebroker/MessageBroker.asmx{R:1}" appendQueryString="true" />
</rule>