【问题标题】:IIS Symfony 4, 404 ErrorIIS Symfony 4, 404 错误
【发布时间】:2018-04-03 22:22:22
【问题描述】:

我正在尝试在我的环境中制作 symfony 4 演示应用程序。 我正在使用带有 CGI 和重写模块的 IIS。我无法访问演示的主页,我认为我的 IIS 配置没有配置好。 symfony 4 和 IIS 有标准的 web.config 吗?我什么都没找到。

【问题讨论】:

  • 从供应商页面看,他们不支持在 IIS 上运行。 ping 他们的支持资源,因为没有官方答复,您几乎不可能将其移植到 IIS。

标签: symfony iis web-config


【解决方案1】:

我终于让它工作了。我将 htaccess 的重写规则转换为 IIS xml。 它看起来像下面。希望对他人有所帮助。

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
    <rewrite>
        <rules>
            <rule name="Imported Rule 1" stopProcessing="true">
                <match url="^(.*)$" ignoreCase="false" />
                <conditions logicalGrouping="MatchAll">
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                </conditions>
                <action type="Rewrite" url="index.php" appendQueryString="true" />
            </rule>
        </rules>
    </rewrite>
</system.webServer>
</configuration>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-10-13
    • 2015-10-18
    • 2012-07-13
    • 1970-01-01
    • 2018-07-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多