On Thu, Dec 9, 2010 at 10:47 AM, Bryan Tong Minh
<bryan.tongminh(a)gmail.com>wrote;wrote:
On Thu, Dec 9, 2010 at 5:28 PM, Jeroen De
Dauw<jeroendedauw(a)gmail.com>
wrote:
This appears to go wrong only on wikis rewriting
urls.
You are rewriting into the root of the domain. This is guaranteed to
go wrong and therefore an unsupported rewrite mode for MediaWiki.
Traditionally I've shared the fervor to just say "don't do that", but
since
a lot of folks do it anyway, here's some advice that may help in this
configuration. :)
As Bryan noted, it looks like what's happening is that your system has
$wgScriptPath and $wgArticlePath pointing at the same place. Your rewrite
rules at the web server level are excluding files such as api.php, but
MediaWiki doesn't know about that exclusion; it sees an incoming URL in the
$wgArticlePath space and ends up thinking it has an article title that it
needs to extract.
Try setting $wgUsePathInfo = false in your LocalSettings.php. This should
bypass these checks, and will avoid interfering with your input variables.
Of course this requires that your rewrite rules in the web server are using
the title query string parameter, not appending it to the path.
This must be a relatively recent[1] regression: I use a similar setup on
my wiki, and it worked just fine until I upgraded to svn trunk HEAD
recently. It also seems to be only affecting api.php; normal requests
work just fine.
Officially supported or not, I vote we fix it.
[1] "Relatively recent" here meaning since the 1.16 branch or so.
--
Ilmari Karonen