After some review I'm thinking of eliminating Alias as the recommended way of configuring short urls in MediaWiki and instead exclusively suggesting the use of RewriteRules.

I reviewed how Alias seems to work and I can't see any real advantage at all to using it. Certainly not enough to outweigh the disadvantages to making it a recommendation.

- Internally Apache relies on a PATH_INFO based hack to handle Alias. With Alias a /wiki/Article gets converted to DOCROOT/w/index.php/Article and Apache goes through the PATH_INFO pattern of hunting down the location of the php script. (This is basically a hack) - Alias only works for 1 of the 4 possible Apache contexts. So it ends up requiring us to make our documentation extra complex just to support it. - Alias requires absolute paths while rewrites can take advantage of %{DOCUMENT_ROOT}

The only advantage Alias has I can see is that from the outside it looks like a simple one-line config.

It's been suggested in the past that Alias is faster but I have doubts about that. Even if Apache shortcuts past the rewrite engine and any regxps (which I have a feeling it doesn't) Alias involves Apache's PATH_INFO handling which likely involves a number of stat calls and filesystem IO just to find the location of the php script.

And in any case the php script will take much longer than anything apache is doing so that kind of performance is really a moot point anyways.

To top off the issues with Alias, it can't be used to setup a 404 image thumbnail handler and it can't be used in the future plans of MediaWiki handling 404s internally.

--
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to