谁能告诉我下面的重写对于 web.config 文件的转换是什么?
RewriteEngine On
RewriteRule ^/(credits|content)/?$ switch.php?view=$1
或者,如果有任何在线转换工具会很棒。
谢谢
编辑
例如:
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
将会:
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions>
<add input="{HTTP_HOST}" pattern="^example\.com$" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="http://www.example.com/{R:1}" />
</rule>
</rules>
</rewrite>