[Mediawiki-l] converting ugly url to pretty with rewrite

a@kid a at kid632.org
Mon Apr 24 18:16:12 UTC 2006


Try this ...

if you want users to type
yourdomain.com/wiki/SomeArticle
to get
yourdomain.com/rootdirectory/index.php?title=SomeArticle

use
RewriteRule ^wiki/(.*)$ rootdirectory/index.php?title=$1 [QSA]

then go into your localsettings.php and set
$wgArticlePath = "/wiki/$1";

Note: This will only make pretty urls for article pages - not for  
edit pages.

Hope this works for you
It's been a while since i've messed around with this
but i experienced the same frustration when i first tried to get  
pretty urls






More information about the MediaWiki-l mailing list