<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
				<rule name="api1" stopProcessing="true">
                    <match url="^api\/([^\/]+)\/([^\/\.]+)\/([^\/\.]+)\/?" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="app/index.php?M={R:1}&amp;C={R:2}&amp;F={R:3}" logRewrittenUrl="true" />
                </rule>            
				<rule name="api2" stopProcessing="true">
                    <match url="^api\/([^\/]+)\/([^\/\.]+)\/?" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="app/index.php?M={R:1}&amp;C={R:2}" logRewrittenUrl="true" />
                </rule>
                <rule name="api3" enabled="true" stopProcessing="true">
                    <match url="^api\/([^\.\/]+)$" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="app/index.php?M={R:1}" />
                </rule>
            </rules>
        </rewrite>
        <defaultDocument>
            <files>
                <clear />
                <add value="Default.htm" />
                <add value="Default.asp" />
                <add value="index.htm" />
                <add value="index.html" />
                <add value="iisstart.htm" />
                <add value="index.php" />
            </files>
        </defaultDocument>
        <staticContent>
            <mimeMap fileExtension=".crx" mimeType="application/octet-stream" />
        </staticContent>
    </system.webServer>
</configuration>
