How to install MediaWiki on a subdomain

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

  1. In /var/www/ilikefish.com/.htaccess, set up a redirect

    RedirectMatch /wiki/(.*) http://wiki.ilikefish.com/$1

  2. 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

  1. In LocalSettings.php, set the following variables:

    $wgScriptPath = "";
    $wgArticlePath = "/$1";
    $wgUsePathInfo = true;
    $wgLogo = "/my_fish_logo.png";
    $wgScriptExtension = ".php";

Finding Forrester (he’s not at JCCSF)

One of my favourite scenes from Finding Forrester is when Jamal corrects Professor Crawford:

Prof. Robert Crawford: [to Jamal] Perhaps your skills do reach farther than basketball.
Jamal: “Further”
Prof. Robert Crawford: What?
Claire Spence: [whispered to Jamal] Don’t…
Jamal: [to Crawford] You said that my skills reached “farther” than basketball. “Farther” relates to distance, “further” is a definition of degree. You should have said “further”.
Prof. Robert Crawford: Are you challenging me, Mr. Wallace?
Jamal: Not any more than you challenged Coleridge.

The JCCSF’s new tagline is “Your Membership Goes Farther.”

You can see it on their yelp page and on their bus ads:

Where, exactly, does the JCC’s membership take you?