【发布时间】:2014-03-19 21:49:41
【问题描述】:
您好,当我尝试在 IIS mod_rewrite 中转换此文件时遇到这些错误
此指令未转换,因为 IIS 不支持它: RewriteBase /php-login/
和
不支持条件模式:-l
Options -MultiViews
RewriteEngine On
RewriteBase /php-login/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
这里是 XML 视图中的错误,请查看错误
<rewrite>
<!--This directive was not converted because it is not supported by IIS: RewriteBase /php-login/.-->
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.+)$" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<!--The condition pattern is not supported: -l.-->
</conditions>
<action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
【问题讨论】:
-
因此,IIS 可能不支持这些功能,您要么不使用它们,要么想办法用支持的东西替换它们。您可能需要相应地重新表述您的问题。
-
我不知道让它工作有没有办法,因为我真的需要它,或者你有任何其他具有相同功能的解决方案吗?
标签: .htaccess iis mod-rewrite web-config