Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 384
Mahdi Ghiasi Avatar asked Mar 13 '12 13:03

Mahdi Ghiasi


People also ask

Why do I keep getting 500 internal server error?

The HTTP status code 500 is a generic error response. It means that the server encountered an unexpected condition that prevented it from fulfilling the request. This error is usually returned by the server when no other error code is suitable.

How do I fix HTTP 500 error on my website?

The first solution to a 500 internal server error is to refresh the page. If the error persists, you may try clearing the cookies, deactivating faulty plugins or themes, fixing the . htaccess file, or contacting your hosting provider.

How do you fix 500 Internal server error There is a problem with the resource you are looking for and it Cannot be displayed?

500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed. To resolve this issue, set the Enable 32-bit Applications to "False": Open the Internet Information Services (IIS) Manager.

How do I fix 500 Internal server error in IIS?

IIS error The error 500.19 is an internal server error often occurring on a server using Microsoft IIS software. It indicates that the configuration data for the page is invalid. To solve the issue, delete the malformed XML element from the Web. config file or from the ApplicationHost.


1 Answers

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.

like image 131
Mahdi Ghiasi Avatar answered Sep 25 '22 09:09

Mahdi Ghiasi