Arabic permalink not found

I am working on Arabic wordpress website and I have a problem when using arabic title for the post. the single post page always redirect to 404 page but with english permalinks it work perfectly

when I tried to use the_permalink(); it returns:

http://a3lamy.com/%d8%aa%d8%ac%d8%b1%d8%a8%d8%a9/

while in wordpress admin dashboard when edit post the permalink looks like:

http://a3lamy.com/تجربة/

the datebase server collation is utf8_general_ci

when I open the wp-posts table I found the post-name is :

%d8%aa%d8%ac%d8%b1%d8%a8%d8%a9

and when I change it manually it become تجربة in the database but still the permalink redirects to 404 not found page!

My web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="WordPress Rule" stopProcessing="true">
<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>

Any help will be appreciated.

2 Answers
2

This issues is caused due to IIS does not recognize the multi language urls,

You need to add the following code at the end of the wp-config.php file:

if ( isset($_SERVER['UNENCODED_URL']) ) {
$_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL'];}

Leave a Comment