You can put something like this to your LocalSettings.php:
---
$wgServer = "http://example.com";
$wgHooks['BeforeInitialize'][] = 'redirectIfLoggedIn';
function redirectIfLoggedIn( &$title, &$article, &$output, &$user,
$request, $mediaWiki ){
if ($user->isLoggedIn()) {
if (strpos($title->getFullURL(),"http:") === 0){
header('Location:
'.str_replace("http","https",$title->getFullURL()));
exit;
}
else{
$wgServer = "https://example.com";
}
}
return true;
}
---
2014/1/22 Al <alj62888(a)yahoo.com>
Hi,
I have SSL setup and working with apache and can browse the site with http
or https, but does anyone know how to make mediaWiki switch to https when
logging on? Or, at the very least, switch temporarily just for the login?
Thanks,
Al
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l