I am using wordpress wirh permalink structure (/%year%/%monthnum%/%day%/%postname%/) on iis server.
The issue is with non-latin characters like malayalam.
I wrote the web.config as follows,
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<httpRuntime requestValidationMode="2.0" requestPathInvalidCharacters="" relaxedUrlToFileSystemMapping="true" AllowRestrictedChars="1" UrlSegmentMaxLength="2048" />
<pages validateRequest="false" />
</system.web>
<system.webServer>
<security>
<requestFiltering allowDoubleEscaping="true" />
</security>
<rewrite>
<rules>
<rule name="WordPress Rule" stopProcessing="true" >
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?page={R:0}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Posts page goes to date archive.How to fix this?
Just add the code below in your index.php file in your site root directory:
if (isset($_SERVER['UNENCODED_URL'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL'];
}
Your web.config needs to be like this:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="WordPress: http://yoursite" 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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With