Manual:Hooks/BeforeHttpsRedirect

BeforeHttpsRedirect
Available from version 1.24.0 (Gerrit change 132952)
Removed in version 1.37.0
Called prior to forcing HTTP->HTTPS redirect. Use this hook to override how the redirect is output.
Define function:
public static function onBeforeHttpsRedirect( IContextSource $context, string &$redirect ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"BeforeHttpsRedirect": "MyExtensionHooks::onBeforeHttpsRedirect"
	}
}
Called from: File(s): MediaWiki.php
Function(s): maybeDoHttpsRedirect
Interface: BeforeHttpsRedirectHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:BeforeHttpsRedirect extensions.


DetailsEdit

  • $context: An IContextSource instance
  • &$redirect: A modifiable string URL

See alsoEdit