Last active
January 12, 2018 14:03
-
-
Save rickbutterfield/4669024 to your computer and use it in GitHub Desktop.
WordPress web.config for running PHP on IIS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<system.webServer> | |
<!-- URL rewriting so it doesn't have to use index.php --> | |
<rewrite> | |
<rules> | |
<rule name="wordpress" patternSyntax="Wildcard"> | |
<match url="*" /> | |
<conditions> | |
<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> | |
<!-- CORS - http://enable-cors.org/ --> | |
<httpProtocol> | |
<customHeaders> | |
<add name="Access-Control-Allow-Origin" value="*" /> | |
</customHeaders> | |
</httpProtocol> | |
<!-- WordPress upload fix --> | |
<security> | |
<requestFiltering> | |
<requestLimits maxAllowedContentLength="100000000" /> | |
</requestFiltering> | |
</security> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment