I recently wrote a solution for IIS because I know some users still program via Windows (This is better with new VS Code). For some XAMPP and WAMPP older machines, they become too slow, making them rely on internal solutions like IIS. I think this topic solves the person who needs it via IIS, in fact I think this code should be part of the Phalcon Dev build (i don't know how to do it) and it would be interesting to be part of Phalcon's Doc as IIS and Phalcon configuration, after installing phalcon.dll within PHP installed by Webmatrix or by WebPlataformInstaller.
The solution is simple. Installs on IIS machine (works from 6.5 and up). Along with IIS, it installs the desired database and PHP for IIS (whatever version that works with phalcon). The secret for this solution to work is to have URL Rewriter 2.0 installed, this is MANDATORY.
Manually download the phalcon DLL for your version of PHP and put it inside the PHP ext folder that is inside program files, depending on the version installed, it may be in the x86 folder or in the x64 folder. Running in cmd "php -v" helps identify the version and folder, or a file with phpinfo (); code.
Now is the solution: 1 - Create within the root folder of your project the web.config file as following code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="YourSite Static" stopProcessing="true">
<match url="([\S]+[.](ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf))" ignoreCase="true" />
<action type="Rewrite" url="public/{R:1}" redirectType="Permanent" />
</rule>
<rule name="YourSite Rule" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUESTFILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUESTFILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="public/index.php?_url=/{R:1}" appendQueryString="true" logRewrittenUrl="false" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
2 - Create inside the / public / folder of your project another web.config with the code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="YourSite Rule" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUESTFILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUESTFILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?_url=/{R:1}" appendQueryString="true" logRewrittenUrl="false" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Ready. Now it works within IIS quietly.