lcrocker@nupedia.com wrote:
The following URL goes successfully to the desired article:
The "random page" error occurs for me only when I follow a link by
clicking on it:
Maybe this behavior difference of the 2 forms of the same URL will
provide a hint of the bug's cause.
Thanks, and yes, that's a clue. I just rebooted the server since Jimbo said that fixed it last time, but I'll look into it more closely now--maybe mod_redirect is dying for some reason?
As I've mentioned before, I'm pretty sure it's the encoding hack I set up to keep ampersands in titles _in_ the titles instead of as raw ampersands that indicate the beginning of the next variable in the query string:
RewriteEngine On RewriteMap urlencode prg:/usr/local/bin/urlencode RewriteRule ^/wiki/(.*)$ /w/wiki.phtml?title=${urlencode:$1} [L]
If the hackish little external program should die or get out of sync, we end up with the wrong URLs. But this ugliness *shouldn't* be needed. We *should* be able to use the internal function that Apache provides for this:
RewriteEngine On RewriteMap urlencode int:encode RewriteRule ^/wiki/(.*)$ /w/wiki.phtml?title=${urlencode:$1} [L]
but that function doesn't encode ampersands (%26), so it misses the entire point of the exercise.
If anyone knows a cleaner way to do this, do speak up. I've gotten eerie silence on alt.apache.configuration.
-- brion vibber (brion @ pobox.com)
wikitech-l@lists.wikimedia.org