MediaWiki Clean URLs
From JJBwiki
Here are the steps I took to create URLs without /index.php, /w, or /wiki. The documentation on the wiki was crucial, but I didn't use any of the recipes in its entirety. Also, that page and the INSTALL file seem to conflict somewhat. (The INSTALL file says that you can't have the source files in the web root if using no leading directory such as /wiki, but I did not experience this issue). This recipe applies to dreamhost. Also see the dreamhost documentation
- Place this in your .htaccess file:
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)$ /index.php?title=$1 [L,QSA]
- And these variables in your LocalSettings.php file:
$wgScriptPath = ""; $wgScript = "$wgScriptPath/index.php"; $wgArticlePath = "/$1";
That's it!
