将 HTACCESS 转换为 WEB.CONFIG IIS7
Convert HTACCESS to WEB.CONFIG IIS7
我有这个 .htaccess 文件。通过 URL Rewrite 模块将其导入 IIS 时出现错误。有人可以帮忙将其转换为 webconfig 吗?
提前致谢
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?action= [NC,L]
</IfModule>
IIS 重写模块不支持第三个条件"is symbolic link"。如果没有实施符号 link,则以下规则将是等效的:
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.+)$" ignoreCase="true" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="true" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="true" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?action={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
我有这个 .htaccess 文件。通过 URL Rewrite 模块将其导入 IIS 时出现错误。有人可以帮忙将其转换为 webconfig 吗?
提前致谢
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?action= [NC,L]
</IfModule>
IIS 重写模块不支持第三个条件"is symbolic link"。如果没有实施符号 link,则以下规则将是等效的:
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.+)$" ignoreCase="true" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="true" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="true" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?action={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>