Manual talk:Short URL/wiki.example.com/Page title--Subdomain with no Subdirectory in Article URL

I wanted direct requests to the Main_Page when the URL was "" or "/". My directory structure is a bit redundant, but it's:

/var/www /var/www/mediawiki /var/www/mediawiki/wiki

I used this vhost to do the desired redirects. Also note that I changed the main redirect specified on this page to ignore the leading slash as it wasn't passing the correct content to index.php:

 ServerName wiki.YOURDOMAIN..com DocumentRoot "/var/www/mediawiki"

RewriteEngine On

#allow fetching of css, js and the like RewriteRule ^/(W|w)iki/skins/([a-z]+)/(.+)$	/wiki/skins/$2/$3 [L] #allow fetching of fave icon RewriteRule ^/favicon.ico$	/wiki/favicon.ico [L] # get home page requests to Main_Page RewriteRule ^(\/*)$	/wiki/index.php?title=Main_Page [L] # all other requests go to specific page RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(\/*)(.*)$ /wiki/index.php?title=$2 [L,QSA] 