title: Zend Framework 2 IIS url rewrite
body: <p>I moved my zend project from Apache to IIS 7 and set up URL Rewrite.
  The home page shows just fine, but the css and javascript aren't loading.</p>
  
  <p>Here is my rewrite scripts</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;configuration&gt;
      &lt;system.webServer&gt;
          &lt;defaultDocument&gt;
              &lt;files&gt;
                  &lt;clear /&gt;
                  &lt;add value="index.php" /&gt;
              &lt;/files&gt;
          &lt;/defaultDocument&gt;
          &lt;rewrite&gt;
              &lt;rules&gt;
                  &lt;rule name="Imported Rule 1" stopProcessing="true"&gt;
                      &lt;match url="^.*$" /&gt;
                      &lt;conditions logicalGrouping="MatchAll"&gt;
                          &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /&gt;
                      &lt;/conditions&gt;
                      &lt;action type="Rewrite" url="public/index.php" /&gt;
                  &lt;/rule&gt;
                  &lt;rule name="Imported Rule 1-1" stopProcessing="true"&gt;
                      &lt;match url="\.(js|ico|txt|gif|jpg|png|css)$" ignoreCase="false" negate="true" /&gt;
                      &lt;action type="Rewrite" url="public/index.php" /&gt;
                  &lt;/rule&gt;
              &lt;/rules&gt;
          &lt;/rewrite&gt;
      &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Here are the original mod_rewrite rules</p>
  
  <pre><code>RewriteCond %{REQUEST_FILENAME} -s [OR]
  RewriteCond %{REQUEST_FILENAME} -l [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^.*$ - [NC,L]
  
  RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
  RewriteRule ^(.*) - [E=BASE:%1]
  RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]
  </code></pre>
  
  <p>Any suggestions?</p>