-
Rewrite rules IIS
To be able to use the search server together with the DataEase server behind a IIS server, we have to add rewrite rules to blend it into the site used by the server.
To do this you have to make an inbound and an outbound rule.
Inbound rule
Add rule from Inbound rules and select "Blank rule".
Name the rule something that fits the purpose with suffix Inbound. Ex SearchInbound. In this example we set up a reverse proxy on incoming /search/* to the root at another server. In this example this server responds to http://127.0.0.1:8006/ and it should have whatever comes after /search/ in the site.
Under Match:
Pattern: search/(.*)
Let conditions be as default.
Rewrite
http://127.0.0.1:8284/{R:1}
Append querystring yes
Stop processing of subsequent rule set to trueMove this rule up over the general reverse proxy that will take any request.
Outbound rule:
Add rule and select Blank rule from Outbound rules.
Name it something that says what it does and add suffix OutBound. Ex SearchOutbound. In this example we want to just rewirte the url to the domain server with /search/ as the path. Ex https://server.name.domain/search/
Precondition:
<none>Match:
Matching scope:
Response
Match content within:
Not needed for me but will usually be A, Form, Img
Content: Using:
Matches the Pattern RegEx
Pattern: ^http(s)?://127.0.0.1:8006/(.*)
Action:
Rewrite
Action Properties
Value:
http{R:1}://server.name.domain/search/{R:2}To do the search after this setup, use server.name.domain/seach/yourquery in your browser. The result comes back as json.