Some weeks ago I started to play with Zend Framework 2, and im impressed with what I have seen so far.

Lately I have started to use PHP with IIS (using the PHP manager, check it out: and since everyone knows that IIS does not support .htaccess-files I had to find a way around it, after a quick search I found a blog post written by Rob Allan, but his suggestion didn’t work in my case.

By default IIS7 does not have the URL Rewrite module installed, so you have to install manually by downloading from the webpage.

When that’s done, go to your public-folder (where the .htaccess-file is) create a new file, name it “web.config” and paste this rewrite rule:

<?xml version="1.0" encoding="UTF-8"?>
                <rule name="Empirio (" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="false" />
                        <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" />

Restart IIS and now the routes on ZF2 should work.