Mobile app version of vmapp.org
Login or Join
Merenda212

: URLs of created MediaWiki pages always include "index.php?title=" I am an absolute beginner at MediaWiki, and just installed an instance through my hosting provider. When I create a new page on

@Merenda212

Posted in: #Mediawiki

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
wiki.stevenarntson.com/Group_1

rather than
wiki.stevenarntson.com/index.php?title=Group_1

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Merenda212

1 Comments

Sorted by latest first Latest Oldest Best

 

@Smith883

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:

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/w/index.php [L]


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

$wgScriptPath = "/w";
$wgArticlePath = "/";

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme