Extension:ShortUrl

Not to be confused with Extension:UrlShortener or Manual:Short URL.
Category:Extensions without an imageCategory:Extensions without a compatibility policyCategory:BSD licensed extensions
MediaWiki extensions manual
ShortUrl
Release status: stableCategory:Stable extensions
Implementation Special page Category:Special page extensions
Description Adds a special page that redirects to an article based on the given base36-encoded ID
Author(s) Yuvi Panda
Latest version 1.2.0 (2015-01-29)
MediaWiki 1.25+Category:Extensions with manual MediaWiki version
Database changes Yes
Tables shorturls
License BSD 3-clause "Modified" License
Download Category:Extensions in Wikimedia version control
  • $wgShortUrlTemplate
  • $wgShortUrlReadOnly
Quarterly downloads 15 (Ranked 81st)
Translate the ShortUrl extension if it is available at translatewiki.net
Issues Open tasks · Report a bug
Category:All extensions

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

  • Download and move the extracted ShortUrl folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/ShortUrl
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'ShortUrl' );
    
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Usage

  1. When installed redirects are available under Special:ShortUrl/<base36>.
  1. Links to redirects can be found in the Toolbox and under the heading (JavaScript only)

Configuration

  1. (Optional) Run populateShortUrlTable.php maintenance script. Fills the shorturl database table with entries for all namespace/title parts of all currently existing articles.
  1. Set $wgShortUrlTemplate to the template of the path for generating short URLs. $1 is replaced with the actual short URL ID.

See also

Category:Extensions used on Wikimedia#ShortUrl
Category:All extensions Category:BSD licensed extensions Category:BeforePageDisplay extensions Category:Extensions in Wikimedia version control Category:Extensions used on Wikimedia Category:Extensions with manual MediaWiki version Category:Extensions without a compatibility policy Category:Extensions without an image Category:LoadExtensionSchemaUpdates extensions Category:SidebarBeforeOutput extensions Category:Special page extensions Category:Stable extensions Category:WebRequestPathInfoRouter extensions