<!-- Merge this rule into the existing SITE ROOT system.webServer/rewrite/rules,
     before PHP catch-all rules. This is not a replacement web.config.
     Requires IIS WebSocket Protocol, URL Rewrite 2.x and ARR 3 with proxy enabled.
     Apply only to the staging setup described in IIS-PHP.md. -->
<rule name="Rain Flyff WebSocket gateway" stopProcessing="true">
  <match url="^ws/(certifier|login|cache)$" ignoreCase="false" />
  <conditions logicalGrouping="MatchAll">
    <add input="{HTTPS}" pattern="^on$" />
    <add input="{HTTP_HOST}" pattern="^realmsofrhisis\.online(?::443)?$" />
    <add input="{REQUEST_METHOD}" pattern="^GET$" ignoreCase="false" />
  </conditions>
  <action type="Rewrite" url="http://127.0.0.1:8080/ws/{R:1}" appendQueryString="true" />
</rule>
