Skip to content

Instantly share code, notes, and snippets.

@davidanton1d
Last active January 24, 2017 11:46
Show Gist options
  • Save davidanton1d/b1e564b584ab3a2b13287850b06c3229 to your computer and use it in GitHub Desktop.
Save davidanton1d/b1e564b584ab3a2b13287850b06c3229 to your computer and use it in GitHub Desktop.
Wordpress on IIS - rewrite rules
<?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>
</system.webServer>
</configuration>
@davidanton1d
Copy link
Author

davidanton1d commented Jan 24, 2017

Add file to the root catalog of the IIS site.
Based on this gist (and its comments): https://gist.github.com/jonahvsweb/5479580

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