I currently have the default web.config file in the root directory of WordPress on an IIS Server.
<?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>
</system.webServer>
</configuration>
However, I would like to add the following lines in there but I’m not sure where to add them in:
<httpProtocol>
<customHeaders>
<add name="X-UA-Compatible" value="IE=9; IE=10; IE=11" />
</customHeaders>
</httpProtocol>
This is used to display the website in IE compatibility mode.
Many thanks.
You should put it under the
system.webServer
node of the file: