Wikimedia's URL-routing logic straddles five layers: Varnish, Apache, the file system, multiwiki, and MediaWiki code. This makes the URL dispatching patterns harder to discern and harder still to reason about, and it couples us tightly to a particular software stack. It's a problem for other users of MediaWiki, too: anyone who has spent a bit of time fielding questions on #mediawiki knows that users often naively expect pretty URLs to work out of the box, and they are confused when we send them away to tinker with mod_rewrite rules.
Let's replace all that cruft by picking a good URL dispatcher library and by gradually making it MediaWiki's exclusive web entry-point.
Some popular choices: