Topic on Extension talk:ShortUrl

the path for generating short URLs

3
Domitori (talkcontribs)

Statement Set $wgShortUrlTemplate to the template of the path for generating short URLs. $1 is replaced with the actual short url id. should be explained. I have installed this the ShortUrl extension at http://mizugadro.mydns.jp/q/index.php/Special:Version but it does not work. I added line $wgShortUrlTemplate= "http://mizugadro.mydns.hp/k" at the end of the LocalSetting.php

expecting, that instead of http://mizugadro.mydns.hp/q/index.php/test

I can type simply http://mizugadro.mydns.hp/k/test

but I see, this does not work. When, where and how should I specify the desired short URL for this wiki to make it work? Should I create directory http://mizugadro.mydns.hp/k ? Should I put there some files? How to quess, which files should be placed there?

Some sentences or paragraphs seem to be missed between statements "Set $wgShortUrlTemplate to the template of the path for generating short URLs." and "$1 is replaced with the actual short url id."

Could you recover, please the missed explanation?

TerraCodes (talkcontribs)

Pinging @Yuvipanda: as they are the user listed as the author.

80.84.117.82 (talkcontribs)

I know this one is old as heck, but here is the answer:

If, for instance, you have your MediaWiki on "wiki.com" domain, and you have $wgArticlePath = "/wiki/$1" (you can check that in LocalSettings.php file), and you want you short links to look like "wiki.com/wiki/short/_shortname_", your $wgShortUrlTemplate would look like this:

$wgShortUrlTemplate='/wiki/short/$1';

For some reason I am unable to post this into the article directly, maybe somebody else could do it?

Reply to "the path for generating short URLs"