Manual:Redirects
Jump to navigation
Jump to search
A redirect is a page that contains a line such as:
#redirect [[Sandbox]]
Redirects are recorded in the redirect table. Configuration settings relevant to redirects include:
- $wgDebugRedirects (defaults to false), displays redirect location instead of actually redirecting to the target URL.
- $wgDisableHardRedirects (defaults to false), disables redirects to special pages and interwiki redirects, which use a 302 and have no "redirected from" link.
- $wgInvalidRedirectTargets (defaults to
array( 'Filepath', 'Mypage', 'Mytalk' )
) is an array of invalid page redirect targets. - $wgMaxRedirectLinksRetrieved (defaults to 500), is the maximum number of links to a redirect page listed on Special:Whatlinkshere/RedirectDestination.
- $wgMaxRedirects (defaults to 1), is the max number of redirects to follow when resolving redirects.
- $wgRedirectSources (defaults to false), is a regular expression to restrict URLs which will be displayed as 'redirected from' links.
Double redirects
There are several ways to fix double redirects. fixDoubleRedirects.php is a maintenance script that fulfils that purpose. $wgFixDoubleRedirects is a configuration setting that can take care of such redirects as they are created, but it is only suitable for use on a private wiki because page move vandalism causes problems when it is set to true
.