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.

<?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