Last modified: 2010-05-15 15:59:38 UTC
On my Mediawiki install using the Search form (either "Go" or "Search") fails. Instead of a search result I get a "No such special page You have requested an invalid special page." If I enter myhost.com/wiki/Special:Search I do get to the search page and can do the search. Also, if I change the URL from "myhost.com/wiki/Special:Search?search=foo&fulltext=Search" to "/wiki/Special:Search?foo=bar&search=foo&fulltext=Search" then I get results. If the first GET variable is "search" then the URL fails. This lead me to believe that my Short URL's might be configured wrongly. I use Lighttpd with the following rewrite-rules (picked from the Manual:Short URL page: url.rewrite-once = ( "(^/wiki/[^:]*[\./].*)" => "$1", "^/wiki/([^?]*)(?:\?(.*))?" => "/w/index.php?title=$1$2", "^/wiki/" => "/w/index.php", ) The wiki is installed to directory "w".
Sounds like some problem with your rewrite rules, yes.
It's somewhat undecided whether we want to support this sort of configuration... some would prefer to more aggressively put parameters after $wgArticlePath/$wgActionPaths-style links.
I'm not very familiar with Lighttpd, but if I see it right, you make a mistake in your second rewrite rule. You add the query string (the part after the '?' char) to the title, but this will rewrite to (using your example) /w/index.php?title=Special:Searchsearch=foo&fulltext=Search Clearly, you want to add an ampersand between $1 and $2, but that would also add an unnecessary ampersand if you have an empty query string. I would simply add an extra rule so that you have one for queries WITH query string and one for queries WITHOUT query string. With Apache's mod_rewrite, I can simply use the qsappend flag to copy the query string over automatically. Doesn't Lighttpd have something similar? In mod_rewrite, this flag will even figure out if it has to use ? or & before the query string.