Mahdi Ghiasi
Mahdi Ghiasi

Reputation: 15311

Web.Config causes 500 internal server error

This is my web.config file contents:

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

I'm trying to use pretty permalinks of wordpress.

But this web.config files causes 500 Internal Server Error.

What is the problem?

Upvotes: 5

Views: 7778

Answers (2)

vatzkie
vatzkie

Reputation: 11

The answer provided by Mahdi is correct. However, if you are unable to install the URL Rewrite module (which was the problem I had due to some signature verification problem), you can download an older version of the module from the link provided below. This ended up working for me. Hope this helps.

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

Upvotes: 1

Mahdi Ghiasi
Mahdi Ghiasi

Reputation: 15311

The problem was from the server, they have not installed Microsoft URL Rewriting Module correctly...

The module has been installed correctly, and then problem solved.

Upvotes: 9

Related Questions