Knowledgebase
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"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="false" />
<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>
</system.webServer>
</configuration>

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))
Helpful
Not helpful

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

Copyright © 2020 EPhost, Inc. All rights reserved.