Skip to content

Instantly share code, notes, and snippets.

@eliasfaical
Forked from Toddses/iis-web.config
Created November 2, 2018 14:10
Show Gist options
  • Save eliasfaical/e26677a5bc794333fed71e4611e08f97 to your computer and use it in GitHub Desktop.
Save eliasfaical/e26677a5bc794333fed71e4611e08f97 to your computer and use it in GitHub Desktop.
Example web.config for WordPress on IIS
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="index.php" />
</files>
</defaultDocument>
<rewrite>
<rules>
<clear />
<rule name="WordPress Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<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>
<outboundRules>
<clear />
</outboundRules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment