Jason Spirko wrote:
Thanks Platonides, where would I place this code? I tried in the LocalSettings.php and it does not seem to work.
Write an special page.
<?php class MainPageLoginRedirect extends SpecialPage { function MyExtension() { SpecialPage::SpecialPage("MainPageLoginRedirect"); }
function execute( $par ) { global $wgUser; if ( $wgUser->isLoggedIn() ) header("Location: /wiki/Real_Main_Page"); //Issues a 302 Redirect else header("Location: /wiki/Special:UserLogin");
exit(0); #TODO: Send the redirect using the Mediawiki function. } } ?>