Manual:Short URL/wiki/Page title -- No hidden subdirectory, no root access

From MediaWiki.org

Jump to: navigation, search

This method assumes you have a wiki installed in www.yoursitehere.com/wiki_path/. Other methods tend to assume a /w folder where your wiki is actually installed, while your users point to a virtual folder. This method dispenses with the virtual folder.

Disclaimer

  • You will need to be able to utilize .htaccess files. If your server does not permit this, this method will not work.
  • This method will probably not work with articles that have + in the title.

Instructions

$wgArticlePath = "$wgScriptPath/$1";
$wgUsePathInfo = true;
  • Create .htaccess in your wiki_path folder.
  • Edit .htaccess
 RewriteEngine On
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^(.*)$ index.php/$1 [PT,L,QSA]

You should be good to go!

Personal tools