May i ask how do i rewrite url from
"https://hello.com/test/api/zoo/v1/animal?animal_record_no=20900016431"
to
"https://145.123.2.12:5000/api/zoo/v1/animal?animal_record_no=20900016431"
the query string "animal_record_no" is optional.
Basically i just want to remove the "test" from the url and change the ip address.
This is what i have now, but it does not forward the query string:
<rule name="ReverseProxyInboundRule3" stopProcessing="true">
<match url="^test/([_0-9a-zA-Z-]+)/([_0-9a-zA-Z-]+)/([_0-9a-zA-Z-]+)/([_0-9a-zA-Z-]+)/?$" />
<action type="Rewrite" url="http://145.123.2.12:5000/{R:1}/{R:2}/{R:3}/{R:4}" />
<conditions>
</conditions>
</rule>
If i were to use redirect, i got a HTTP/1.1 301 Moved Permanently error
<rule name="ReverseProxyInboundRule3" enabled="true" stopProcessing="true"> <match url=".*test/(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="iex.odp.gov.sg" />
</conditions>
<action type="Redirect" url="http://145.123.2.12:5000/{R:1}" />
Thanks for the help.
