WordPress Web.Config Rules for Windows
Posted by Joe Rebis on 16 June 2020 09:55 AM

To make sure WordPress runs properly on a Windows platform please place the following rules in the web.config file. This is the functional equivalent to the HTACCESS file in Apache.  

<?xml version="1.0" encoding="UTF-8"?>
<directoryBrowse enabled="false" />
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<action type="Rewrite" url="index.php" />

For maximum compatibility with the Windows platform, it's best to put your WordPress permalink rules in the web.config file in in the root directory, instead of the HTACCESS file which is typically for Linux/Apache. We employ an Apache emulator to allow you to use an HTACCESS file on IIS / Windows for some compatibility between the two systems, but usually now we just use web.config as you can do all of the same things.



(0 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Copyright © 2021 EPhost, Inc. All rights reserved.