Release status: beta
|Description||Adds a special page that redirects to an article based on the given base36-encoded ID|
|Latest version||1.2.0 (2014-03-28)|
|License||BSD 3-clause "Modified" License|
Translate the ShortUrl extension if it is available at translatewiki.net
|Check usage and version matrix; code metrics|
|Open tasks · Report a bug|
ShortUrl is a special page extension that helps create shortened URLs for wiki pages, using their base36 encoded IDs. Adds a 'Short URL' link to the Toolbox. Primarily developed for use in the Indic Language Wikipedias.
Installation[edit | edit source]
- Download and place the file(s) in a directory called
- Add the following code at the bottom of your LocalSettings.php:
wfLoadExtension( 'ShortUrl' );
- Run the update script which will automatically create the necessary database tables that this extension needs.
- Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
To users running MediaWiki 1.24 or earlier:
The instructions above describe the new way of installing extensions using
wfLoadExtension(), since MediaWiki 1.25. If you need to install this extension in earlier versions, instead of
wfLoadExtension( 'ShortUrl' );, you need to use:
Usage[edit | edit source]
- When installed redirects are available under Special:ShortUrl/<base36>.
Configuration[edit | edit source]
- (Optional) Run
populateShortUrlTable.phpmaintenance script. Fills the shorturl database table with entries for all namespace/title parts of all currently existing articles.
$wgShortUrlTemplateto the template of the path for generating short URLs. $1 is replaced with the actual short URL ID.
See also[edit | edit source]
|This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page.|