我有一个阿拉伯语WordPress站点托管在带有IIS7的Windows Server上(我无法转移到Linux托管)。 我试图将WordPress中的永久链接设置更改为:/%postname%/
但是当我访问任何文章时,例如: http : //www.example.com/تجربة/我被重定向到主页,同样的事情发生在类别和标签上。
我没有访问IIS设置,除了web.config(我在共享主机上)。 这是我的web.config设置:
<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>我在PHP 5.5上运行。
I have an Arabic WordPress site hosted on a Windows Server with IIS7 (I can't move to Linux hosting). I tried to change the permalinks settings in WordPress to this: /%postname%/
But when I access any article for example like this: http://www.example.com/تجربة/ I'm being redirected to the homepage, same thing happens with categories and tags.
I don't have access to IIS settings except for the web.config (I'm on shared hosting). Here's my web.config settings:
<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>I'm running on PHP 5.5.
最满意答案
此问题是由于IIS无法识别多语言网址引起的,
您需要在wp-config.php文件的末尾添加以下代码:
if ( isset($_SERVER['UNENCODED_URL']) ) { $_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL'];}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'];}更多推荐
发布评论