IIS上的WordPress阿拉伯语永久链接(WordPress Arabic permalinks on IIS)

编程入门 行业动态 更新时间:2024-10-22 14:01:15
IIS上的WordPress阿拉伯语永久链接(WordPress Arabic permalinks on IIS)

我有一个阿拉伯语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'];}

更多推荐

本文发布于:2023-07-04 11:03:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1023579.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:阿拉伯语   链接   WordPress   IIS   Arabic

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!