Manual:Short URL/wiki/Page title -- no root access, version 1.11, 1.12 and 1.13
From MediaWiki.org
After trying several methods already listed with no success, I turned to a support forum on Apache mod_rewrite and posted contents from my .htaccess files along with a description of how I wanted the urls to map, and got some very useful suggestions on how to structure the rewrite instructions to make them function properly.
This has been tested in version 1.11.x, 1.12.x and 1.13alpha and is working in all three.
This method was tested with the MediaWiki script files installed in /w directory, but mapping the clean urls to /wiki/$1. I wanted any visitors accessing my site using http://www.mysite.com to get directed to the main page of the wiki and see the url "http://www.mysite.com/wiki/Main_Page", with additional page accesses mapping to "http://www.mysite.com/wiki/$1" where $1 is the name of the wiki article.
[edit] LocalSettings.php
The following lines need to be added to the LocalSettings.php file (I added these lines right after the $wgSitename = "my wiki site"; line):
$wgUsePathInfo = false; $wgArticlePath = "/wiki/$1";
The following lines were added to the .htaccess file, which I placed in the public web root directory :
# rewrite rules to make default page the wiki and create pretty urls Options FollowSymLinks Indexes RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^wiki/(.*)$ /w/index.php?title=$1 [PT,L,QSA] RewriteRule ^wiki(//+)?$ /wiki/ [L,QSA] RewriteRule ^/*$ /wiki/ [L]
This method does not work if there is an existing /wiki folder on your site. /wiki is a virtual folder that is used for clean urls only; the .htaccess rewrite instructions map a page request that looks like this:
http://www.mysite.com/wiki/Main_Page
to this:
http://www.mysite.com/w/index.php?title=Main_Page"
without the site visitor seeing the actual url; they only see the clean url.

