<?xml version="1.0" encoding="utf-8"?>

<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">

  <connectionStrings xdt:Transform="Replace">
    <add name="pkmnFoundationsConnectionString"
         connectionString="Server=localhost;Database=gts;User ID=gts;Password=gts;Pooling=true;charset=utf8;Allow User Variables=True"
         providerName="MySql.Data.MySqlClient" />
  </connectionStrings>

  <system.web>
    <compilation xdt:Transform="RemoveAttributes(debug)" />
  </system.web>

  <system.webServer>
    <rewrite xdt:Transform="Insert">
      <rules>
        <rule name="Host and HTTPS redirect" stopProcessing="true">
          <match url="(.*)" />
          <conditions logicalGrouping="MatchAny">
            <add input="{HTTP_HOST}" pattern="^pkmnclassic\.net$" negate="true" />
            <add input="{HTTPS}" pattern="OFF" />
          </conditions>
          <action type="Redirect" url="https://pkmnclassic.net/{R:1}" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
  
</configuration>
