Settings for mediawiki running on Apache server, with clean URLs like domain.tld/Article_Name
, when the installation directory is %{DOCUMENT_ROOT}/w/
The Contents of the .htaccess
file:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?(.*)$ %{DOCUMENT_ROOT}/w/index.php/$1 [L,QSA]
RewriteRule ^/*$ %{DOCUMENT_ROOT}/w/index.php [L,QSA]
Modifications in LocalSettings.php
file:
$wgScriptPath = "/w";
$wgArticlePath = "/$1";
$wgUsePathInfo = true;
$wgScriptExtension = ".php";
That's about it!