Web.Config导致500内部服务器错误

问题描述 投票:4回答:2

这是我的web.config文件内容:

<?xml version="1.0"?> 

<configuration> 

    <system.webServer>
    <httpErrors errorMode="Detailed" />
        <asp scriptErrorSentToBrowser="true"/>
        <rewrite>
            <rules>
                <rule name="Main Rule" stopProcessing="true">
                    <match url=".*" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php" />
                </rule>
            </rules>
        </rewrite>

     </system.webServer>

    <system.web>
        <customErrors mode="Off"/>
        <compilation debug="true"/>
    </system.web>
</configuration>

我正在尝试使用wordpress的相当永久链接。

但这个web.config文件导致500 Internal Server Error

问题是什么?

iis-7 web-config
2个回答
8
投票

问题来自服务器,他们没有正确安装Microsoft URL Rewriting Module ...

模块已正确安装,然后问题解决了。


1
投票

马赫迪提供的答案是正确的。但是,如果您无法安装URL重写模块(这是由于某些签名验证问题而导致的问题),您可以从下面提供的链接下载旧版本的模块。这最终为我工作。希望这可以帮助。

https://forums.iis.net/t/1239468.aspx?URL+rewrite+installation+failing+due+to+signature+verification+failure

© www.soinside.com 2019 - 2024. All rights reserved.