Manual:Short URL/Page title -- Aliasing method--Root access
From MediaWiki.org
Originally from the page http://meta.wikimedia.org/wiki/Using_a_very_short_URL
[edit] Aliasing method
Please see the article Cool URIs don't change and take a few minutes to devise a stable URL structure for your web site before hopping willy-nilly into rewrites into the URL root.
This modification will make very short url.
Edit LocalSettings.php variables:
$wgScriptPath = ""; $wgScript = ""; $wgArticlePath = "/$1";
Edit Apache2 configuration file (require mod_alias enabled):
<IfModule mod_alias.c>
Alias /skins /var/lib/mediawiki1.8/skins
Alias /index.php /var/lib/mediawiki1.8/index.php
Alias / /var/lib/mediawiki1.8/index.php
<Directory /var/lib/mediawiki1.8>
Options -Indexes
</Directory>
</IfModule>
Be sure to change /var/lib/mediawiki1.8 to reflect the root of the wiki folder (i.e. /home/bob/public_html/wiki, /Library/WebServer/Documents)
Remember to restart apache for changes to take effect
If you cannot get it to work with this sample - try adding a / sign after index.php in following 2 alias lines, so they look like this:
Alias /index.php /var/lib/mediawiki1.8/index.php/ Alias /images /var/lib/mediawiki1.8/images/ Alias /skins /var/lib/mediawiki1.8/skins/ Alias / /var/lib/mediawiki1.8/index.php/
This sample did not work in my server until I added / after index.php - now it works like a charm.
Tip for Windows users: Use double quotes around your dirs, like this:
Alias /skins "c:\wamp\www\skins" Alias /index.php "c:\wamp\www\index.php\"

