Just to let you know why it does that.
When you ask for a webpage, you can add attribute to a webpage prior to its loading which is helpful to send specific data to this webpage.
Let say we want to send the attribute title with the value "Main_Page" .
Url rewriting, give you the possibility to match one or more of these attributes with the url structure.
That's why we match /w/index.php?title=$1 to /wiki/$1
Note that wiki/$1 is parsed as /w/index.php?title=$1
The thing is, even if we rewrite the url, we can add other attributes to the url.
You can imagine that : wiki/$1?action=edit is parsed as /w/index.php?title=$1&action=edit
As an example :
http://en.wikipedia.org/wiki/Main_Page?action=edit
is the same as
http://en.wikipedia.org/w/index.php?title=Main_Page&action=edit
Therefore, if you send something like /wiki/What's the matter folks?
Apache himself will treat this url as /w/index.php?title=What's the matter folks&
and /wiki/What's the matter folks?action=edit will be parsed as /w/index.php?title=What's the matter folks&action=edit and so on.
the action=edit gives you the edit form of an article with the specified title.
Now that you understand why it's not working, the only way to put an "?" in an attribute is to put it in an attribute itself without url rewritting :
/w/index.php?title=What's the matter folks?
As the server waits an & to parse the next attribute it will include the question mark in the title attribute.
However, if an attribute is part of the URL-rewriting, you can only include a question mark with the url encoding of it. (%3F)
You will notice that the % alone or without valid letters following it will not work either. As it is used for url encoding.
Note that when you do a link in the wiki [[What's the matter folks?]] the parser will parse it as What's the matter folks%3F
http://www.w3schools.com/tags/ref_urlencode.asp
Thierry
Thanks Theirry
Good tutorial for newbies on how article titles are parsed by Mediawiki and basic URL encoding. I'm pretty well versed in all the mechanics of Rewriting, and URL encoding and the use of ?, &, Mediawiki, etc.
I am now convinced the problem I'm having seems to be with the host, their Apache and the Nginx / Varnish server conf file. I think their nginx.conf file is missing some directives. I am passing the title as 'How_Are_You%3F_I_hope_OK', but for some reason, Nginx is rewriting/passing %3F as a ? which is causing the issue. It should be writing/passing the URL exactly as %3F, but it is and it isn't. In the browser address bar it shows %3F, but it must be passing it as a ? to Mediawiki's parser. Using web-sniffer, I can verify with every HTTP request, the %3F is being passed in, but not back out.
I know nothing about Nginx and at this time have no desire to learn about it. All experiences with it have been negative with nothing but problems. On a positive note, I noticed the HTTP headers were finally corrected by the host! Only took a year and a half to stop doubling the Content-Length in the header which was crashing my bot. I feel like this host is trying to squeeze everything it can out of this shared server... but it is slow and laggy, it's embarrassing.
I'll go back to beating my drum (going on 2 years) with this .org, New Host, immediately if not sooner.
Thanks Tom
mediawiki-l@lists.wikimedia.org