简体   繁体   中英

setting rule in IIS url rewrite module

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.

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM