Manual:Hooks/GetLocalURL

Details

 * $title: Title object of page
 * $url: string value as output (out parameter, can modify)
 * $query: query options passed to Title::getLocalURL

Usage
This hook can be used to alter the canonical URL of pages under specific circumstances. This is useful for instance since (MediaWiki 1.26) made MediaWiki automatically redirect from non-standard to canonical URLs. See an example usage at.