Help translating .htaccess to web.config url rewrite
What would this rewrite rule from .htaccess translate to IIS7 we开发者_如何转开发b.config?
RewriteRule .* index.php/$0 [PT,L]
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...
IIS7 and above can import Apache .htaccess rules using the URL Rewrite module.
- Install the URL Rewrite module via the Microsoft Web Platform Installer
- Start IIS Manager and on the left, in the Connections pane, select your required site (e.g. Default Web Site)
- In the centre (Features View) double click URL Rewrite.
- In the right panel click Import Rules... then paste your rules from the .htaccess file into the Rewrite rules box
- Click apply in the right column.
精彩评论