On Fri, Aug 5, 2011 at 6:26 PM, Platonides Platonides@gmail.com wrote:
Daniel Friesen wrote:
Our docs on how to setup shorturls have been horrible for awhile. They just about all suggest /index.php?title=$1 based rewrite rules. Despite the fact that MediaWiki has REQUEST_URI based handling code to extract titles from shorturls itself. The result is that a lot of these wiki have bugs with titles like [[C++]] and [[A&B]].
They work fine with QSA flag, which most servers should support by now. RewriteRule ^wiki/?(.*)$ /w/index.php?title=$1 [L,QSA]
Presence of QSA or not doesn't seem to make a difference for me trying that rule on Apache/2.2.19 (Mac OS X 10.7 default install), no chance to check my Linux box until back in SF. :)
Is it possible that Apache finally changed mod_rewrite to assume that it's passing in individual strings and correctly escapes them?
Nope... it's actually that MediaWiki's manual processing of REQUEST_URI overwrites the raw query string processing.
$_GET for '/trunk/wiki/AT&T' translated to '/trunk/index.php?title=AT&T' still comes out as:
array(2) { ["title"]=> string(2) "AT" ["T"]=> string(0) "" }
:(
-- brion