Zend framework iis7上的Zend框架

Zend framework iis7上的Zend框架,zend-framework,iis,web-config,rewrite,Zend Framework,Iis,Web Config,Rewrite,最近在运行Zend Framework的windows服务器上设置了一个站点,只有index.php页面显示正确。所有其他内部页面看起来都被重定向到index.php,URL被重写为正确的页面URL。非常奇怪,似乎无法确定是服务器配置还是web.config中的退役规则。任何建议都将不胜感激。 谢谢 Kam在使用IIS 7的Windows 2008 Server上,我在服务器根目录中为我的ZF应用程序提供了以下web.config文件(“C:\intepub\wwwroot”),它允许我以与Li

最近在运行Zend Framework的windows服务器上设置了一个站点,只有index.php页面显示正确。所有其他内部页面看起来都被重定向到index.php,URL被重写为正确的页面URL。非常奇怪,似乎无法确定是服务器配置还是web.config中的退役规则。任何建议都将不胜感激。 谢谢
Kam

在使用IIS 7的Windows 2008 Server上,我在服务器根目录中为我的ZF应用程序提供了以下web.config文件(“C:\intepub\wwwroot”),它允许我以与Linux服务器相同的方式运行应用程序

希望这能帮助您和其他人开始使用IIS使用Windows

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Get rid of the world wide web" enabled="true" stopProcessing="true">
                    <match url="^(.*)" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{HTTP_HOST}" pattern="^www\.example\.com$" />
                        <add input="{HTTP_HOST}" pattern="^$" ignoreCase="false" negate="true" />
                    </conditions>
                    <action type="Redirect" url="http://example.com/{R:1}" redirectType="Permanent" />
                </rule>
                <rule name="Ignore files on the filesystem" stopProcessing="true">
                    <match url="^(.*)$" />
                    <conditions logicalGrouping="MatchAny">
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" />
                    </conditions>
                    <action type="None" />
                </rule>
                <rule name="Point to the site entry gate" stopProcessing="true">
                    <match url="^.*$" />
                    <action type="Rewrite" url="public/index.php" logRewrittenUrl="true" />
                </rule>
            </rules>
        </rewrite>
        <defaultDocument>
            <files>
                <clear />
                <add value="index.php" />
                <add value="index.html" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>