On 12/10/2010 12:39 AM, Brion Vibber wrote:
> On Thu, Dec 9, 2010 at 10:47 AM, Bryan Tong Minh
> <[email protected]>wrote:
>
>> On Thu, Dec 9, 2010 at 5:28 PM, Jeroen De Dauw<[email protected]>
>> 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

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to