Last active
May 25, 2024 10:16
-
-
Save Toddses/7f3729ddf7c6466bb3dc to your computer and use it in GitHub Desktop.
Example web.config for WordPress on IIS
This file contains 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
<?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> |
Thanks man 👍
The gift that keeps on giving!
NOTE: A web.config file is include with the WordPress-provided IIS version .zip file. IT DOES NOT WORK. But the file provided by Toddses above DOES WORK.
thanks work 10000%
Thanks, man, for helping to make the internet a better place. This code saved me a lot. Wish I could buy you coffee
Thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't have much knowledge about Windows. I was working from last 2 days but no luck. Thanks @Toddses you saved my time. It's working :)