简体   繁体   English

Ascii编码破坏了MediaWiki漂亮的URL

[英]Ascii Encoding Breaks MediaWiki Pretty URLs

I have a MediaWiki site with the following configuration for pretty URLs: 我有一个MediaWiki网站,其漂亮的网址具有以下配置:

$wgSitename = "somewiki";
$wgScriptPath = "";
$wgScriptExtension = ".php";
# Added to "beautify" URLs
$wgArticlePath = "${wgScriptPath}/$1";
#$wgUsePathInfo = true; # This is not needed

I can reach 我可以到达

https://somewiki/index.php?title=foo%2Bbar HTTPS://somewiki/index.php名称= foo%2Bbar

but not 但不是

https://somewiki/foo%2Bbar <--- This gives a 404 https:// somewiki / foo%2Bbar <--这给出了404

This wiki is running in IIS in the cloud. 该Wiki在云中的IIS中运行。 URLs without non-ASCII characters work fine. 不含非ASCII字符的URL可以正常工作。 Eg, I can reach 例如,我可以达到

protocol//somewiki/hellowiki 协议// somewiki / hellowiki

and

protocol//somewiki/index.php?title=hellowiki 协议// somewiki /的index.php?标题= hellowiki

There must be a setting or configuration to allow the encoded non-ASCII characters to work. 必须进行设置或配置以允许编码的非ASCII字符起作用。

Got it. 得到它了。 There was a specific problem with the + symbol (unrelated to the URI encoding): +符号存在一个特定的问题(与URI编码无关):

http://www.ifinity.com.au/Blog/EntryId/60/404-Error-in-IIS-7-when-using-a-Url-with-a-plus-sign-in-the-path http://www.ifinity.com.au/Blog/EntryId/60/404-Error-in-IIS-7-when-using-a-Url-with-a-plus-sign-in-the-path

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM