What's the IIS equivalent of these rewrite rules? What's the IIS equivalent of these rewrite rules? apache apache

What's the IIS equivalent of these rewrite rules?


You can import them automatically, just go to the Site or Application you want and double click URL Rewrite icon, then use the Import Rules... link in the task list.In that UI, just copy/paste the rules above and click OK, it will import those to your web.config.

The equivalent in your web.config would be (of course inside configuration/system.webServer...etc):

<rewrite>    <rules>      <rule name="Imported Rule 1" stopProcessing="true">        <match url="^(.*)$" ignoreCase="false" />        <conditions>          <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />          <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />        </conditions>        <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" />      </rule>    </rules>  </rewrite>  

For more information on how to import them: http://learn.iis.net/page.aspx/470/importing-apache-modrewrite-rules/


The htaccess lines you posted look very similar to what is used by Zend Framework. They have a rewrite configuration guide that has a section on IIS 7.0.