简体   繁体   中英

IIS Symfony 4, 404 Error

I am trying to make works symfony 4 demo application on my environemnt. I am using IIS with CGI and rewrite module. I can't have access to the home page of the demo, I think my IIS configuration is not well configured. Is there a standard web.config for symfony 4 and IIS? I didn't find anything.

I finally make it works. I convert the rewrite rules of the htaccess to IIS xml. It looks like below. Hoping it will help others.

<?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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM