开发者

Help translating .htaccess to web.config url rewrite

开发者 https://www.devze.com 2022-12-16 10:35 出处:网络
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

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.

  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.
0

精彩评论

暂无评论...
验证码 换一张
取 消