How to: Run Kirby3 on Microsoft IIS (Internet Information Services)

Hej all,

as i could not find any tutorial or working solution on the internet, i painfully figured a way to run kirby 3 on microsoft IIS. in the end its quite straight forward.

1. replace the .htaccess with a web.config file

<?xml version="1.0" encoding="utf-8"?>
<!-- the root web configuration file -->
        <directoryBrowse enabled="false" />
          <requestFiltering allowDoubleEscaping="true"/>
            <rule name="rule 1J" stopProcessing="true">
              <match url="(^|/)\.(?!well-known\/)"  />
              <action type="Rewrite" url="/index.php"  />
            <rule name="rule 2J" stopProcessing="true">
              <match url="^content/(.*)"  />
              <action type="Rewrite" url="/index.php"  />
            <rule name="rule 3J" stopProcessing="true">
              <match url="^site/(.*)"  />
              <action type="Rewrite" url="/index.php"  />
            <rule name="rule 4J" stopProcessing="true">
              <match url="^kirby/(.*)"  />
              <action type="Rewrite" url="/index.php"  />
            <rule name="Importierte Regel 5" stopProcessing="true">
              <match url="^(.*)" ignoreCase="false" />
                <!--# make site links work-->
                <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
              <action type="Rewrite" url="index.php" />

2. add IIS to supported servers in config.php

   'servers' => ['apache', 'symfony', 'IIS'],