1
votes

What would this rewrite rule from .htaccess translate to IIS7 web.config?

RewriteRule .* index.php/$0 [PT,L]

2
Uh, in other words (read: in technically correct terms), you actually want to convert an Apache-specific RewriteRule into an ISAPI-specific RewriteRule? - BalusC
What was the reason for adding the passthrough [PT] flag to the rewrite rule? - VolkerK

2 Answers

1
votes

Can't test it right now but hopefully

<rewrite>
  <rules>
    <rule name="some unnamed rule" stopProcessing="true">
      <match url="^.*$" />
      <action type="Rewrite" url="index.php/{R:0}" />
    </rule>
  </rules>
</rewrite>

isn't too wrong...

0
votes

IIS7 and above can import Apache .htaccess rules using the URL Rewrite module.

  1. Install the URL Rewrite module via the Microsoft Web Platform Installer
  2. Start IIS Manager and on the left, in the Connections pane, select your required site (e.g. Default Web Site)
  3. In the centre (Features View) double click URL Rewrite.
  4. In the right panel click Import Rules... then paste your rules from the .htaccess file into the Rewrite rules box
  5. Click apply in the right column.