代码之家  ›  专栏  ›  技术社区  ›  Andrew

如何让Zend使用IIS 7.0(重写模块v2)和windows 2008?

  •  0
  • Andrew  · 技术社区  · 16 年前

    有人知道让Zend在iis7.0(rewrite modulev2)和windows2008上正常工作的任何已知问题吗?

    在phpinfo()中设置了以下信息

    _SERVER["HTTP_X_ORIGINAL_URL"] /prices/ 
    

    从这个意义上讲,重写似乎是可行的,它总是在index.php页面上运行,只是有时会在主页上显示404,并且不会加载正确的视图。

    1 回复  |  直到 16 年前
        1
  •  2
  •   Andrew    15 年前

    这是正确的标准重写配置:

    <rewrite>
                <rules>
                    <rule name="Zend Standard Rule" stopProcessing="true">
                        <match url="^(.*)$" ignoreCase="false" />
                        <conditions logicalGrouping="MatchAll">
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                        </conditions>
                        <action type="Rewrite" url="index.php?route={R:1}" appendQueryString="true" />
                    </rule>
                </rules>
            </rewrite>
    

    希望这对别人有帮助