Talk:MediaWiki/Short URLs

'wiki.*' code didn't work for my DHI wiki.* subdomain
I don't know why but when I used it, all formatting and images on my wiki disappeared when I used it. I am using MediaWiki version 1.19.2.

Instead I cobbled this together and it seems to work:

LocalSettings.php $wgScriptPath = ""; $wgArticlePath = "/wiki/$1";

.htaccess RewriteEngine on  RewriteRule ^wiki/?(.*)$ /index.php?title=$1 [L,QSA]

'wiki.*' code didn't work for my DHI wiki.* subdomain either
I found this link that worked:. It seems to be working well so far.

LocalSettings.php $wgScriptPath      = ""; $wgScript          = "$wgScriptPath/index.php"; $wgRedirectScript  = "$wgScriptPath/redirect.php"; $wgArticlePath     = "$wgScriptPath/$1";

.htaccess RewriteEngine On  RewriteRule ^(images/|skins/|(api|img_auth|index|load|opensearch_desc|redirect|thumb|trackback)\.php) - [L] RewriteRule ^/*$ /index.php?title=Main_Page [L,QSA] RewriteRule ^(.+)$ /index.php?title=$1 [L,QSA]