HTTP错误500.19 - 内部服务器错误 - web.config问题

时间:2016-09-11 14:44:38

标签: php http iis iis-8.5

当我试图转到localhost时出现此错误,我希望index.php显示出来。 http://i.imgur.com/MwZwyfX.png

这是我的web.config

    <?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Imported Rule 1">
                    <match url="^(|/)$" ignoreCase="false" />
                    <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 2">
                    <match url="^([a-zA-Z0-9_-]+)(|/)$" ignoreCase="false" />
                    <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 3">
                    <match url="^(.*)\.htm$" />
                    <action type="Rewrite" url="{R:1}.php" />
                </rule>
                <rule name="Imported Rule 4">
                    <match url="^(|/)$" ignoreCase="false" />
                    <action type="Rewrite" url="login.php?page={R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 5">
                    <match url="^([a-zA-Z0-9_-]+)(|/)$" ignoreCase="false" />
                    <action type="Rewrite" url="login.php?url={R:1}" appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer> </configuration>

1 个答案:

答案 0 :(得分:0)

第0行意味着您忘记从Microsoft下载并安装IIS URL重写模块。