I am an absolute beginner at MediaWiki, and just installed an instance through my hosting provider. When I create a new page on the wiki, its URL is always prefaced by index.php?title=. I wonder if this is symptomatic of where I installed MediaWiki, or relevant to a preference I could modify in local_settings? I'd like pages to look like


rather than

  • 1
    I might expand this into a full answer later, but does mediawiki.org/wiki/Manual:Short_URL help? Commented Feb 4, 2016 at 4:42
  • This looks potentially very useful, and I see some other good advice about installation in there, too. I'm at the bottom of a big learning curve, and will set to it. Thank you for pointing me in this direction! Commented Feb 4, 2016 at 20:54

1 Answer 1


There's a full guide on how to do this in the MediaWiki manual: Short URL.

Essentially, you put your MediaWiki files in an unrelated directory (e.g. /w) then use the following to rewrite to the root:

RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/w/index.php [L]

To tell MediaWiki you've done this, set the following in your LocalSettings.php:

$wgScriptPath = "/w";
$wgArticlePath = "/$1";
  • The MediaWiki manual page mentions a shortcut approach through the page http://shorturls.redwerks.org/. I went there, and followed the instructions, and it worked! Thank you. Commented Feb 5, 2016 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.