我最近将一个基于Zend framework 1编写的网站从Apache迁移到了IIS7。我按照Rob Allen IIS的指示将规则导入http://akrabat.com/winphp-challenge/zend-framework-url-rewriting-in-iis7/。
除了以下格式的URL之外,其他一切都很正常:
www.example.com/products/download/productname-4.0.0.zip
它显示IIS404错误页,而不是应用程序中的自定义404页。我怀疑是IIS7配置问题。
这里有没有人有类似的经历?
发布于 2014-08-08 04:04:10
下面是我在Zend Framework的IIS7中使用的web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^.*$" />
<conditions logicalGrouping="MatchAny">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" />
</conditions>
<action type="None" />
</rule>
<rule name="Imported Rule 2" stopProcessing="true">
<match url="^.*$" />
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>https://stackoverflow.com/questions/25168280
复制相似问题