Manual:$wgRedirectSources

From MediaWiki.org
Jump to: navigation, search

Other languages:
English • ‎français • ‎日本語 • ‎polski
Interwiki: $wgRedirectSources
Regular expression to restrict URLs which will be displayed as "redirected from" links.
Introduced in version: 1.5.0
Removed in version: still in use
Allowed values: regexp or false
Default value: false
Other settings: Alphabetical | By function

Details[edit]

Other wikis which set $wgDisableHardRedirectsManual:$wgDisableHardRedirects to false may redirect users to pages of your wiki, telling your MediaWiki install from what URL they came from. Set this regular expression to restrict origin URLs which will be displayed as "redirected from" links to them.

It might look something like this:

$wgRedirectSources = '!^https?://[a-z-]+\.wikipedia\.org/!';

(For instance, this example configuration is pointless because Wikipedia doesn't have hard redirects enabled.)

Leave as false to avoid displaying any incoming redirect markers. This does not affect intra-wiki redirects, which don't change the URL.