Manual:Short URL/wiki/Page title -- No Root Access, 1.13 alternative

From MediaWiki.org

Jump to: navigation, search

I changed the setup around a little because my host (1and1) needs it to go to index.php5 to show an article. I've only tested this on 1.13, but if it works on other versions, please update.

[edit] LocalSettings.php

First of all remove all other code you've added from any other Short URL Setups (If you've done any) Next, add the following code after $wgSitename = "my wiki site";

$wgUsePathInfo = false;
$wgArticlePath      = "/wiki/$1";


[edit] .htaccess

Edit or add .htacces to the root folder (Not /w/), and replace with this code:

# 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.php5?title=$1 [PT,L,QSA]
RewriteRule ^wiki(//+)?$ /wiki/ [L,QSA]
RewriteRule ^/*$ /wiki/ [L]
Personal tools