On Nov 11, 2003, at 18:42, Gabriel M. O'Brien wrote:
Brion Vibber wrote:
That sounds pretty weird... Could you post the rewrite rules? I notice it does the same thing for other pages w/ namespaces: http://aiwiki.quay.net/w/wiki.phtml?title=Aikiwiki:Naming_Conventions http://aiwiki.quay.net/wiki/Aikiwiki:Naming_Conventions which makes me suspicious it's something about the colon.
Entirely possible, at best I'm a mod_rewrite novice! ;) Anyway here's the rewrite rules:
RewriteEngine On RewriteRule ^/wiki/(.*)$ /w/wiki.phtml?title=${$1} [L]
Okay, if I use this line I see the same behavior on my text box (Apache 1.3.28 on Mac OS X 10.3). Try this:
RewriteRule ^/wiki/(.*)$ /w/wiki.phtml?title=$1 [L]
without the ${ and } around the $1, that should clear it up.
Investigating...
With the ${$1}, The translated query string ends up being something like "title=${Special:Recentchanges}". This seems to trip up the title canonicalization functions, which strip out illegal characters (such as $ and { and }) but seem to be doing so _after_ the check for a namespace prefix. So it's left with a title 'Special:Recentchanges' in the article namespace, which of course doesn't exist.
Thanks for digging up the title parser bug. :)
The extra ${...} would only get used if you were using a filter; for instance the default rewrite behavior will break title with ampersands, so if you patch your Apache sources with the 'ampescape.diff' patch you can use a filter than fixes it:
RewriteEngine On RewriteMap ampescape int:ampescape RewriteRule ^/wiki/(.*)$ /w/wiki.phtml?title=${ampescape:$1} [L]
-- brion vibber (brion @ pobox.com)