Skip to:
Content
Pages
Categories
Search
Top
Bottom

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.

<pre>
<code><?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></code>
</pre>