Created
September 15, 2015 21:04
-
-
Save aih/8f2b8d76b44d8836bd77 to your computer and use it in GitHub Desktop.
A sample web.config file with URL rewrite rules for Elasticsearch on IIS (Windows)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<remove name="ReverseProxyInboundRule1" /> | |
<rule name="ReverseProxyInboundRule1" stopProcessing="false"> | |
<match url="search/_search(.*)" /> | |
<conditions /> | |
<serverVariables /> | |
<action type="Rewrite" url="http://localhost:9200/_search{R:1}" /> | |
</rule> | |
<rule name="ReverseProxyInboundRule2" patternSyntax="ExactMatch" stopProcessing="true"> | |
<match url="search/_cluster/health" /> | |
<action type="Rewrite" url="http://localhost:9200/_cluster/health" appendQueryString="false" /> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment