Skip to:
Content
Pages
Categories
Search
Top
Bottom
Codex HomeGetting Started → IIS7 web.config

IIS7 web.config

Not sure how correct or valuable this is, but this is currently the web.config file that I use for local Windows 7 II7 development.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <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>
                <rule name="wordpress - Rule 1" stopProcessing="true">
                    <match url="^index\.php$" ignoreCase="false"/>
                    <action type="None"/>
                </rule>
                <rule name="wordpress - Rule 2" stopProcessing="true">
                    <match url="^files/(.+)" ignoreCase="false"/>
                    <action type="Rewrite" url="wp-includes/ms-files.php?file={R:1}" appendQueryString="false"/>
                </rule>
                <rule name="wordpress - Rule 3" stopProcessing="true">
                    <match url="^" ignoreCase="false"/>
                    <conditions logicalGrouping="MatchAny">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false"/>
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false"/>
                    </conditions>
                    <action type="None"/>
                </rule>
                <rule name="wordpress - Rule 4" stopProcessing="true">
                    <match url="." ignoreCase="false"/>
                    <action type="Rewrite" url="index.php"/>
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>
Skip to toolbar