Here is how to set up MediaWiki on a subdomain and use pretty/short URLs. This was tested on July 1, 2010 with MediaWiki 1.15.4, PHP 5.2.8, MySQL 5.0.90 and Apache 2.2.11.
This assumes you are in a shared hosting situation, and do not have root access and cannot edit the Apache configuration files directly.
Your setup
Suppose you have a site, www.ilikefish.com. Its DocumentRoot is /var/www/ilikefish.com. You then create a subdomain, wiki.ilikefish.com, with a DocumentRoot of /var/www/ilikefish.com/wiki.
Configuring Apache
- In
/var/www/ilikefish.com/.htaccess, set up a redirect
RedirectMatch /wiki/(.*) http://wiki.ilikefish.com/$1
- In
/var/www/ilikefish.com/wiki/.htaccess, set up rewrite rules:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Configuring MediaWiki
- In
LocalSettings.php, set the following variables:
$wgScriptPath = "";
$wgArticlePath = "/$1";
$wgUsePathInfo = true;
$wgLogo = "/my_fish_logo.png";
$wgScriptExtension = ".php";




