【问题标题】:how to convert from IIS to apache httpd rewrite rule如何从 IIS 转换为 apache httpd 重写规则
【发布时间】:2013-10-14 08:36:19
【问题描述】:

我看到了一些关于如何将 IIS 转换为 htaccss 的示例。

我使用的是 httpd conf(出于性能原因)+ 我使用了 IIS 的在线转换器 --> htaccess。

转换此规则时:

<rule name="videorecords URL" patternSyntax="Wildcard">
    <match url="videorecords/*" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
    <action type="Rewrite" url="videorecords/{R:1}" />
</rule>

到:

#RULE VIDEORECORDS URL 
RewriteRule videorecords/* videorecords/$1 []

apache 没有加载,我在日志中看到: httpd.conf 第 211 行的语法错误:RewriteRule: unknown flag ''

【问题讨论】:

    标签: apache iis mod-rewrite redirect url-rewriting


    【解决方案1】:

    您的标志为空白:[]。因此,您需要在其中添加一个标志(如L)或删除方括号。

    虽然,我不认为在线转换器给你的重写规则实际上是你想要的。

    【讨论】:

    • 谢谢!!做到了……当我们这样做时……也许你可以帮助我编辑的规则……这令人沮丧……
    • @DannyValariola 这取决于你要做什么,因为看起来原来的 IIS web.config 重写有点坏了。
    猜你喜欢
    • 2014-07-03
    • 2016-01-02
    • 2014-10-29
    • 2011-04-25
    • 2012-07-12
    • 2014-01-05
    • 2014-06-06
    • 2016-12-07
    • 1970-01-01
    相关资源
    最近更新 更多