Skip to content

Instantly share code, notes, and snippets.

@fredfontes
Forked from jonahvsweb/web.config
Last active March 24, 2017 14:09
Show Gist options
  • Save fredfontes/cc8c9976f5be72ae3e402e96e6068adf to your computer and use it in GitHub Desktop.
Save fredfontes/cc8c9976f5be72ae3e402e96e6068adf to your computer and use it in GitHub Desktop.
How to Setup WordPress Permalinks on Windows IIS — Place this file into the base directory of your WordPress installation to allow permalinks (or "pretty URLs") on Windows IIS.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="wordpress" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_URI}" matchType="Pattern" pattern="^/wp-content/" negate="true" />
<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>
</sy
</configuration>
@fredfontes
Copy link
Author

fredfontes commented Mar 24, 2017

Added line 9 for image's bug correction:

<add input="{REQUEST_URI}" matchType="Pattern" pattern="^/wp-content/" negate="true" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment