HostOnNet Blog

Making MeidaWiki urls seo friendly

Open LocalSettings.php

Find

$wgArticlePath      = "$wgScript/$1";

Replace with

$wgArticlePath = "/$1";

Now create .htaccess file with following content

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?title=$1 [L,QSA]

Thats all. Now your media wiki installation have seo friendly url.


Posted in Web