Wo platzieren in der web.config-Datei des IIS-Servers

Lesezeit: 2 Minuten

Benutzer-Avatar
virs90

Ich habe derzeit die Standarddatei web.config im Stammverzeichnis von WordPress auf einem 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>

Ich möchte jedoch die folgenden Zeilen dort hinzufügen, bin mir aber nicht sicher, wo ich sie hinzufügen soll:

<httpProtocol>
  <customHeaders>
    <add name="X-UA-Compatible" value="IE=9; IE=10; IE=11" />
  </customHeaders>
</httpProtocol>

Dies wird verwendet, um die Website im IE-Kompatibilitätsmodus anzuzeigen.

Danke vielmals.

Benutzer-Avatar
Kelte

Sie sollten es unter die setzen system.webServer Knoten der Datei:

<?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>
        <!-- PUT IT HERE -->
        <httpProtocol>
          <customHeaders>
            <add name="X-UA-Compatible" value="IE=9; IE=10; IE=11" />
          </customHeaders>
        </httpProtocol>
    </system.webServer>
</configuration>

  • Ah, das scheint es getan zu haben. Vielen Dank für deine Hilfe.

    – virs90

    10. September 2015 um 7:59 Uhr

  • Kein Problem, könnten Sie die Antwort als richtig markieren, da es funktioniert hat? Vielen Dank.

    – Kelt

    10. September 2015 um 8:00 Uhr

1382550cookie-checkWo platzieren in der web.config-Datei des IIS-Servers

This website is using cookies to improve the user-friendliness. You agree by using the website further.

Privacy policy