I have installed wordpress in IIS server(window server 64bit R2 standerd edition).
I have to write rules in its web.config file for running wordpress site succesfully. When I am trying to add any rules in web.config file, I got an error of 500: Internal server error.
here is my code of web.config file:
<?xml version="1.0" encoding="UTF-8"?><configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*" />
<conditions>
<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>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/index.php?error=404" responseMode="ExecuteURL" />
</httpErrors>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="10.00:00:00" />
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
</staticContent>
</system.webServer></configuration>
If i remove tag, it is working but other part is not working of site(like add to cart and checkout process, etc.).
So, how can I write in web.config file.
Thanks,
Ketan
I got my answer, actually in IIS server rewrite module is disable by default. We have to enable it to use write rules in web.config. after enable this module, my site is working perfectly. hope this can help someone.
Your best bet is to backup & remove your web.config file, then use WordPress permalinks page to generate the web.config file for you. Lastly, add incrementally what you need that WordPress does not do for you.
USE these rule , on IIS